json-uuid

1.0.2 • Public • Published

json-uuid

This is a toolkit for generating JSON unique IDs

Usage examples

const jsonuuid = require('json-uuid')

let a = [1, 4, 2, 'a', {
    c: 1, a: 1, f: {
        "3r": 1,
        "1r": 1,
        "2r": {
            "f1": 3,
            "f3": 3,
            "f2": 3,
        },
    }
}]

let b = [1, 4, 2, 'a', {
    c: 1, a: 1, f: {
        "2r": {
            "f3": 3,
            "f2": 3,
            "f1": 3,
        },
        "3r": 1,
        "1r": 1,
    }
}]

if (jsonuuid.id(a) === jsonuuid.id(b)) {
    console.log('yes');
} else {
    console.log('no')
}

Package Sidebar

Install

npm i json-uuid

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

14.7 kB

Total Files

6

Last publish

Collaborators

  • hootin.wang