<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          JsdiffJS文本差分

          聯(lián)合創(chuàng)作 · 2023-09-30 21:43

          Jsdiff是一款實(shí)現(xiàn)javascript文本差分的軟件。

          安裝:

          npm install diff

          或者

          bower install jsdiff

          API

          • JsDiff.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 diffTrimmedLines

          • newlineIsToken: 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 human

          • dly form of diffLines and diffLines is better suited for patches and other computer friendly output.

          兼容性:

           Jsdiff支持所有ES3環(huán)境和IE8以下一些已知問(wèn)題。這些瀏覽器存在一些差異算法,如文字diff和其他可能由于缺乏拆分操作捕獲組支持的失敗操作。

          瀏覽 31
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  国产一区亚洲天堂 | 人人摸人人爽人人射 | 欧美在线91 豆花 | 久久一级香蕉视频网址 | 神马午夜国产精品 |