Created new data structures for the upcomming matching
This commit is contained in:
parent
620863d703
commit
2f8c798304
3 changed files with 86 additions and 18 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue