2 Commits

Author SHA1 Message Date
668ec71966 1.0.3 2021-12-17 01:39:52 +01:00
4ed7ad210e fix(core): update 2021-12-17 01:39:51 +01:00
3 changed files with 10 additions and 4 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@pushrocks/smartdiff",
"version": "1.0.2",
"version": "1.0.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@pushrocks/smartdiff",
"version": "1.0.2",
"version": "1.0.3",
"license": "MIT",
"dependencies": {
"fast-diff": "^1.2.0"

View File

@@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartdiff",
"version": "1.0.2",
"version": "1.0.3",
"private": false,
"description": "a diffing lib for text",
"main": "dist_ts/index.js",

View File

@@ -2,7 +2,13 @@ import { expect, tap } from '@pushrocks/tapbundle';
import * as smartdiff from '../ts/index';
tap.test('first test', async () => {
const text1 = 'hi there';
const text2 = 'hi Polly, there is a Sandwich.';
const patch = smartdiff.createDiff(text1, text2);
console.log(patch);
const result = smartdiff.applyPatch(text1, patch);
console.log(result);
expect(result).to.equal(text2);
});
tap.start();