gr2m / initials

extract initials from and add initials to names
https://gr2m.github.io/initials
MIT License
44 stars 14 forks source link

test.test@test.org <test.test@test.org> #7

Closed gr2m closed 9 years ago

gr2m commented 9 years ago

should become test.test@test.org (tt) <test.test@test.org>, but becomes test test test org (test.test@test.org <test.test@test.org>) <test.test@test.org>

zoepage commented 9 years ago

@gr2m To make sure the schema is right:

(tt) -> test1.test2@test3.org -> (t1t2) or (t1t3)?

Is there already a test for this? If not, where does it go? To describe( 'initials.addTo( name )', ?

gr2m commented 9 years ago

I've added a test in https://github.com/gr2m/initials/issues/8

I'm not sure what you mean by this?

(tt) -> test1.test2@test3.org -> (t1t2) or (t1t3)?

zoepage commented 9 years ago

thanks for the tests :) just want to know which letters are inserted?

so:

  1. abc.def@xyz.org (ad)
  2. abc.def@xyz.org (ax)
  3. abc.def@xyz.org (adx)
gr2m commented 9 years ago

when you only add an email, the first letters of every word before the @ are used, so

initials('abc.def@xyz.org') === 'ad'