Incorporated some corrections from comments.

This commit is contained in:
Konstantin Mamalakis 2018-02-22 14:01:16 +02:00 committed by Josh Harvey
parent a3f8db79b3
commit 402f75f50c
3 changed files with 39 additions and 31 deletions

View file

@ -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(' ')
)