Natural Pacifist Manatees

    stable-serialize

    0.0.4 • Public • Published

    Stable Serialize

    Consistent stringify and hash for deeply equal objects.

    Usage

    const serialize = require('stable-serialize');
    
    let object1 = {};
    let object2 = {};
    object1.a = 'a';
    object2.b = 'b';
    object1.b = 'b';
    object2.a = 'a';
    
    expect(JSON.stringify(object1)).not.toBe(JSON.stringify(object2));
    expect(serialize.stringify(object1)).toBe(serialize.stringify(object2));
    expect(serialize.hash(object1)).toBe(serialize.hash(object2));
    

    Keywords

    none

    Install

    npm i stable-serialize

    DownloadsWeekly Downloads

    1

    Version

    0.0.4

    License

    ISC

    Unpacked Size

    4.9 kB

    Total Files

    5

    Last publish

    Collaborators

    • jacoblee93