1.1.2 • Published 4 years ago

string-delim-diff v1.1.2

Weekly downloads
3
License
BSD-3-Clause
Repository
github
Last release
4 years ago

string-delim-diff

Takes two arrays of strings, differently delimited (but identical otherwise) and gives you the mapping between them.

build status

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 }
]);