fast-diff

WebJar for fast-diff

Лицензия

Лицензия

Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

fast-diff
Последняя версия

Последняя версия

1.2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

fast-diff
WebJar for fast-diff
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/jhchen/fast-diff

Скачать fast-diff

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/fast-diff/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>fast-diff</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/fast-diff/
implementation 'org.webjars.npm:fast-diff:1.2.0'
// https://jarcasting.com/artifacts/org.webjars.npm/fast-diff/
implementation ("org.webjars.npm:fast-diff:1.2.0")
'org.webjars.npm:fast-diff:jar:1.2.0'
<dependency org="org.webjars.npm" name="fast-diff" rev="1.2.0">
  <artifact name="fast-diff" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='fast-diff', version='1.2.0')
)
libraryDependencies += "org.webjars.npm" % "fast-diff" % "1.2.0"
[org.webjars.npm/fast-diff "1.2.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

Fast Diff Build Status

This is a simplified import of the excellent diff-match-patch library by Neil Fraser into the Node.js environment. The match and patch parts are removed, as well as all the extra diff options. What remains is incredibly fast diffing between two strings.

The diff function is an implementation of "An O(ND) Difference Algorithm and its Variations" (Myers, 1986) with the suggested divide and conquer strategy along with several optimizations Neil added.

var diff = require('fast-diff');

var good = 'Good dog';
var bad = 'Bad dog';

var result = diff(good, bad);
// [[-1, "Goo"], [1, "Ba"], [0, "d dog"]]

// Respect suggested edit location (cursor position), added in v1.1
diff('aaa', 'aaaa', 1)
// [[0, "a"], [1, "a"], [0, "aa"]]

// For convenience
diff.INSERT === 1;
diff.EQUAL === 0;
diff.DELETE === -1;

Версии библиотеки

Версия
1.2.0
1.1.2
1.1.1
1.0.1