string-delim-diff
Version:
Takes two arrays of strings, differently delimited (but identical otherwise) and gives you the mapping between them.
29 lines (19 loc) • 693 B
Markdown
# string-delim-diff
Takes two arrays of strings, differently delimited (but identical otherwise) and gives you the mapping between them.
[](http://travis-ci.org/noblesamurai/string-delim-diff)
## Installation
This module is installed via npm:
``` bash
$ npm install string-delim-diff
```
## Example Usage
``` js
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 }
]);
```