New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

diff-text

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diff-text

Just get the diff of a simple inline text.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

diff-text

Inline text diff algorithm. Simplified from https://neil.fraser.name/writing/diff/. For input text diff in HTML with Chinese input software.

Build Status Coverage Status

Usage

npm i --save diff-text

var diffText = require('diff-text');

diffText('diff---text', 'diff+++text');

// will get array like below:
[
	[0, 'diff'], // equal
	[-1, '---'], // delete
	[1, '+++'],  // add
	[0, 'text']  // equal
]

Test & Perf

> npm run test

> npm run pref

diff-text x 1,238,388 ops/sec ±1.22% (88 runs sampled)

License

ISC@ProtoTeam.

Keywords

text-diff

FAQs

Package last updated on 16 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts