nighca
V2EX  ›  Node.js

JS 的 diff-merge 实现

  •  
  •   nighca · May 20, 2014 · 4098 views
    This topic created in 4413 days ago, the information mentioned may be changed or developed.
    https://github.com/nighca/diff-merge

    适用于文件比对的场景,比对结果可表示为json对象。

    在chrome中测试,采用'\n'分行,700+行的js代码,在改动3行内容的情况下,3ms算出diff结果,merge耗时可忽略不计。

    欢迎使用&报错~
    2 replies    2014-05-22 11:48:44 +08:00
    bsbgong
        1
    bsbgong  
       May 20, 2014
    well done
    支持
    nighca
        2
    nighca  
    OP
       May 22, 2014 via Android
    @bsbgong thx~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2634 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 12:58 · PVG 20:58 · LAX 05:58 · JFK 08:58
    ♥ Do have faith in what you're doing.