Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noblesamurai/string-delim-diff
Takes two arrays of strings, differently delimited (but identical otherwise) and gives you the mapping between them.
https://github.com/noblesamurai/string-delim-diff
Last synced: about 1 month ago
JSON representation
Takes two arrays of strings, differently delimited (but identical otherwise) and gives you the mapping between them.
- Host: GitHub
- URL: https://github.com/noblesamurai/string-delim-diff
- Owner: noblesamurai
- License: other
- Created: 2016-06-02T00:53:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-07-13T03:02:51.000Z (over 3 years ago)
- Last Synced: 2024-12-02T07:51:43.661Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# string-delim-diff
Takes two arrays of strings, differently delimited (but identical otherwise) and gives you the mapping between them.
[![build status](https://secure.travis-ci.org/noblesamurai/string-delim-diff.png)](http://travis-ci.org/noblesamurai/string-delim-diff)
## Prerequisites
```
$ pip install pre-commit
```## Installation
This module is installed via npm:
``` bash
$ pre-commit install --install-hooks
$ 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 }
]);```