Have ideas to improve npm?Join in the discussion! »

    trimerge
    TypeScript icon, indicating that this package has built-in type declarations

    1.3.0-alpha.14 • Public • Published

    Trimerge: Three-way Merge JSON and Structures

    Actions Status npm version codecov

    Experimental 3-way merge library.

    Usage:

    import { combineMergers, trimergeEquality, trimergeJsonObject } from 'trimerge';
     
    const s1 = { hello: 1, world: 2 };
    const s2 = { hello: 1, world: 2, there: 2 };
    const s3 = { hello: 1 };
     
    const merger = combineMergers(trimergeEquality, trimergeJsonObject);
    merger(s1, s2, s3); // => { hello: 1, there: 2 }

    License

    Based on MIT licensed code from node-diff3.

    Install

    npm i trimerge

    DownloadsWeekly Downloads

    388

    Version

    1.3.0-alpha.14

    License

    MIT

    Unpacked Size

    230 kB

    Total Files

    69

    Last publish

    Collaborators

    • avatar