Incorporated some corrections from comments.
This commit is contained in:
parent
a3f8db79b3
commit
402f75f50c
3 changed files with 39 additions and 31 deletions
|
|
@ -10,12 +10,12 @@ const phoneticMethod2 = _.flow(doubleMetaphone, _.uniq)
|
|||
|
||||
const phoneticMethod3 = _.flow(_.split(' '), _.map(phoneticMethod2))
|
||||
|
||||
// Combine name-parts in a standared order.
|
||||
// Combine name-parts in a standard order.
|
||||
|
||||
const fullNameFromParts = _.flow(
|
||||
_.toPairs,
|
||||
_.sortBy(_.nth(0)), // sort by part name,
|
||||
_.map(_.nth(1)), // get part value
|
||||
_.sortBy(_.first), // sort by part name,
|
||||
_.map(_.last), // get part value
|
||||
_.join(' ')
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue