@jollie/soundex-fr
v1.0.8
Published
Soundex function adapted for french phonetics
Downloads
68
Readme
soundex-fr
Soundex function adapted for french phonetics
Compliant, optimized and small package to get soundex key
For mapping used see https://fr.wikipedia.org/wiki/Soundex#Description
Install
yarn add @jollie/soundex-fr
or
npm install @jollie/soundex-fr
Usage
import soundex from '@jollie/soundex-fr';
// Test equal phonetics
if (soundex('Robert') === soundex('Rupert')) {
console.log('Equal soundex');
} else {
console.log('Different soundex');
}
// Output : Equal soundex
Params
soundex(str, length);
| Prop | Type | Default | Note |
|----------|----------|------------------|-----------------------|
| str
| string
| Required field | Input value |
| length
| int
| 4
| Length of soundex key |
Return value
Soundex key of length
chars