striffer
v0.1.0
Published
Finds difference between two or more strings
Readme
Strings Defferer
The package provides functions to find difference between pair or list of strings.
Installation
Using npm:
npm i --save strifferIn a browser:
<script src="dist/striffer.min.js"></script>In Node.js:
const striffer = require('striffer');Documentation
Returns differences between two strings:
Array<object> function byPair(string str1, string str2, object options = null)
Returns differences between several strings in a list:
Array<object> function byList(Array<string> strs, object options = null)
The return item object contains:
stringvalue - an original stringArray<number>diff - the list with indices which frame the differences
Options
numbergreedyFactor, By default: 3booleancaseInsensitive, By default: falsebooleandetailed (byList only), By default: false
