JS文本差分Jsdiff.zip

时间:2022-08-08 03:27:04
【文件属性】:
文件名称:JS文本差分Jsdiff.zip
文件大小:180KB
文件格式:ZIP
更新时间:2022-08-08 03:27:04
开源项目 Jsdiff是一款实现javascript文本差分的软件。安装:npm install diff或者bower install jsdiffAPIJsDiff.diffChars(oldStr, newStr[, options]) - diffs two blocks of text, comparing character by character.Returns a list of change objects (See below).JsDiff.diffWords(oldStr, newStr[, options]) - diffs two blocks of text, comparing word by word, ignoring whitespace.Returns a list of change objects (See below).JsDiff.diffWordsWithSpace(oldStr, newStr[, options]) - diffs two blocks of text, comparing word by word, treating whitespace as significant.Returns a list of change objects (See below).JsDiff.diffLines(oldStr, newStr[, options]) - diffs two blocks of text, comparing line by line.选择:ignoreWhitespace: true to ignore leading and trailing whitespace. This is the same as diffTrimmedLinesnewlineIsToken: true to treat newline characters as separate tokens.  This allows for changes to the newline structure to occur independently of the line content and to be treated as such. In general this is the more humandly form of diffLines and diffLines is better suited for patches and other computer friendly output.兼容性: Jsdiff支持所有ES3环境和IE8以下一些已知问题。这些浏览器存在一些差异算法,如文字diff和其他可能由于缺乏拆分操作捕获组支持的失败操作。 标签:Jsdiff
【文件预览】:
jsdiff-master
----runtime.js(67B)
----index.html(3KB)
----.eslintrc(4KB)
----rollup.config.js(464B)
----yarn.lock(308KB)
----release-notes.md(16KB)
----Gruntfile.js(4KB)
----src()
--------diff()
--------patch()
--------util()
--------index.js(2KB)
--------convert()
----images()
--------node_example.png(6KB)
--------web_example.png(4KB)
----.babelrc(168B)
----.npmignore(162B)
----components()
--------bower.json(114B)
--------component.json(246B)
----tasks()
--------version.js(565B)
----examples()
--------web_example.html(730B)
--------node_example.js(375B)
----CONTRIBUTING.md(1KB)
----.travis.yml(541B)
----LICENSE(2KB)
----test()
--------diff()
--------.eslintrc(187B)
--------patch()
--------index.js(917B)
--------convert()
--------mocha.opts(36B)
----README.md(9KB)
----.gitignore(60B)
----karma.conf.js(1KB)
----style.css(1KB)
----package.json(2KB)

网友评论