Created new data structures for the upcomming matching

This commit is contained in:
Konstantin Mamalakis 2018-02-28 19:17:45 +02:00 committed by Josh Harvey
parent 620863d703
commit 2f8c798304
3 changed files with 86 additions and 18 deletions

View file

@ -22,9 +22,9 @@ const makeFullName = _.flow(
const makeWords = value => {
const words = _.split(' ', value)
const phonetic = _.map(makePhonetic, words)
const props = _.zipAll([words, phonetic])
return _.map(_.zipObject(['value', 'phonetic']), props)
const phonetics = _.map(makePhonetic, words)
const pairs = _.zipAll([words, phonetics])
return _.map(_.zipObject(['value', 'phonetics']), pairs)
}
module.exports = {