A nodejs library for phonetic string matching which exposes implementation of phonetic algorithms like soundex, metaphone and double-metaphone algorithms.
A nodejs library for phonetic string matching which exposes: soundex, metaphone and double-metaphone algorithms.
const Phonetics = require('phonetics');
// or import * as Phonetics from 'phonetics'
console.log(Phonetics.soundex('phonetic'));
output: p532
const Phonetics = require('phonetics');
console.log(Phonetics.soundexMatch('phonetic', 'phonetics'));
output: true
const Phonetics = require('phonetics');
console.log(Phonetics.metaphone('phonetic'));
output: FNTK
const Phonetics = require('phonetics');
console.log(Phonetics.metaphoneMatch('phonetic', 'phonetics'));
output: false
const Phonetics = require('phonetics');
console.log(Phonetics.doubleMetaphone('phonetic'));
output: [ 'FNTK', 'FNTK' ]
const Phonetics = require('phonetics');
console.log(Phonetics.doubleMetaphoneMatch('phonetic', 'phonetics'));
output: false