nextrans-check-name-similarity
v0.1.4
Published
Validate two string similiarity
Downloads
4
Readme
Nextrans String Similarity
Instalation
npm install nextrans-check-name-similarity
How to use
import StringSimiliarity from 'nextrans-check-name-similarity';
const {
MIN_VALIDATE_NAME_SENSITIVITY = 0.85,
MIN_VALIDATE_SHORT_NAME_SENSITIVITY = 0.65,
MAX_SHORT_NAME_LENGTH = 8,
} = process.env;
const stringSimilarity = new StringSimiliarity({
minValidateNameSensitivity: +MIN_VALIDATE_NAME_SENSITIVITY,
minValidateShortNameSensitivity: +MIN_VALIDATE_SHORT_NAME_SENSITIVITY,
maxShortNameLength: +MAX_SHORT_NAME_LENGTH,
});
console.log(stringSimilarity.validateBeneficiary('Ujang Kalong', 'Ujang Marujang'));