string-delim-diff
v1.1.2
Published
Takes two arrays of strings, differently delimited (but identical otherwise) and gives you the mapping between them.
Downloads
10
Readme
string-delim-diff
Takes two arrays of strings, differently delimited (but identical otherwise) and gives you the mapping between them.
Installation
This module is installed via npm:
$ npm install string-delim-diff
Example Usage
var stringDelimDiff = require('string-delim-diff'),
expect = require('expect.js');
var out = map(['a', 'b c', 'd e f'], ['a b c', 'd e', 'f']);
expect(out).to.eql([
{ segments: ['a', 'b c'], more: false },
{ segments: ['d e'], more: true },
{ segments: ['f'], more: false }
]);