{"name":"nimnjs","version":"1.3.0","description":"Schema aware compression of JS object/JSON data. 60% more compressed than json","main":"src/nimn.js","scripts":{"test":"jasmine tests/*test.js","bundle":"browserify src/nimn.js -s nimn -o dist/nimn.js","coverage":"istanbul cover -x \"tests/*test.js\" jasmine tests/*test.js;","coverage:check":"istanbul check-coverage --branch 90 --statement 90"},"keywords":["nimn","nimnjs","json","compress","parse","format","msgpack"],"author":{"name":"Amit Gupta","url":"https://github.com/amitguptagwl"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/nimndata/nimnjs-node.git"},"bugs":{"url":"https://github.com/nimndata/nimnjs-node/issues"},"homepage":"https://github.com/nimndata/nimnjs-node","dependencies":{"nimn-date-parser":"^1.0.0","nimn_schema_builder":"^1.0.0"},"devDependencies":{"benchmark":"^2.1.4","browserify":"^15.1.0","coveralls":"^3.0.0","istanbul":"^0.4.5","jasmine":"^3.0.0","jasmine-core":"^2.99.1","cbor":"^4.0.0","notepack.io":"^2.1.2","msgpack":"^1.0.2"},"gitHead":"a717e346a250a3832286e5037d8a654861e5512f","_id":"nimnjs@1.3.0","_npmVersion":"5.8.0","_nodeVersion":"9.10.1","_npmUser":{"name":"amitgupta","email":"amitgupta.gwl@gmail.com"},"dist":{"integrity":"sha512-iUoip0bypaCEK/tXSHn3NDY8WKmzUdcE6JK3Jbi4yqsaJY+iaT6JHMKj2MwwC67zszCRblPPo1dYsXMfVCkiOA==","shasum":"20a603fa5112838b8bd2b0a6e21bf30929ac769d","tarball":"http://registry-npm.ywwl.com/nimnjs/download/nimnjs-1.3.0.tgz","fileCount":14,"unpackedSize":25370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4c9YCRA9TVsSAnZWagAAhHwP+gI2uFDjd2/gN6tAiRZq\n86Ukm24KciAHtGnqcI4gyVu+AH/1xyLi8bMyO3CqKEUMQ12fAvqM0iKKqj29\n5fVp3Or7GJXy3VGeX1jEkoXoDYoRL6Muj93Macw48gg4Tqur86nZDd219pmx\nsHIjX/X5RnJfLu5VDXKSvur6B1QuazVIEqO1FcWKjoeYp8IHxCGba40eHC0b\nOpLLKaL+PD58HKoa0xquz3G2JSosQwbX6LPcpiybNhZFah+WiCmfMMMNEz4d\nHXp089VL0jWWLZtcdHwdGH7JkxFpSz62skc8d18RHxLi/D2cbAwiLCHB0Jx6\nibMBfAydV3cZBTJak/k4r05nxG9H/CAqkMvAbdcgxF7N71kSnTs5mHj4O32E\nmgNyxtQe7BIMeUrpni/lmEayz1cz/6ahCHlD5KumCfPTCFUqFA5JWJ/+Tnw5\np2kS7R/WjjeW5Cwu+dTZEB2UUFhsF826K/OycM9keGlFGLEcwG6awWbBbKgl\nBPbzVfnmwmzWVzDFU8UluF0boQi/Cm/Gw6oMb26+GYQewR5D8+4WFUuo9kBt\nf1Y4j5LKtfFOpIwg9zEcv1kfbjlQsSPWq4gonkWgE3RqI7AEs4uzWK0/Jgpu\nuyJ8IjSht2qz0t8iUVMyFTEjpP0MdU44yPDnn/l2GvXrcfw+Tl0Iw3qODzA8\nOk2j\r\n=exA5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnmleLsx9WKI/zUV00s2pL3gaF/DUjvj7WsGvLnPtpVQIhAPgpMTrPVRGVve/T59ht9/9IvYC2vHTJVGzAAiun6pIN"}],"size":8120,"noattachment":false,"key":"/nimnjs/-/nimnjs-1.3.0.tgz"},"maintainers":[{"name":"amitgupta","email":"amitgupta.gwl@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nimnjs_1.3.0_1524748119793_0.8082954905963062"},"_hasShrinkwrap":false,"readme":"# nimnjs-node\nJS implementation of nimn specification. Highly Compressed JS object/JSON. 60% or more compressed than JSON, 40% or more compressed than msgpack\n\n<a href=\"https://paypal.me/naturalintelligence\"> <img src=\"static/img/support_paypal.svg\" alt=\"Stubmatic donate button\" width=\"200\"/></a>\n\n\n<img align=\"right\" src=\"static/img/nimnjs-logo.png\" /> \n\n## Introduction\nNIMN JS can parse JS object to nimn data and vice versa. See Nimn [specification](https://github.com/NaturalIntelligence/nimn-spec) for more detail.\n\n## Usages\nFirst install or add to your npm package\n```\n$npm install nimnjs\n```\n\n```js\nvar nimn = require(\"nimnjs\");\n\nvar objStructure = {\n    type : \"list\",\n    detail : {\n        type : \"map\",\n        detail : [{\n            name : \"name\",\n            type : \"string\"\n        },{\n            name : \"age\",\n            type : \"number\"\n        },{\n            name : \"isHuman\",\n            type : \"boolean\"\n        },{\n            name : \"address\",\n            type : \"string\"\n        },{\n            name : \"hobbies\",\n            type : \"list\",\n            detail : {\n                type : \"string\"\n            }\n        },{\n            name : \"project\",\n            type : \"map\",\n            detail: [{\n                name: \"title\",\n                type : \"string\"\n            },{\n                name: \"description\",\n                type : \"string\"\n            },{\n                name: \"status\",\n                type : \"string\"\n            }\n            ]\n        }\n        ]\n    }\n}\n\n\nvar schema = nimn.buildSchema(objStructure);\n\nvar jData = [{\n    \"name\" : \"somename\",\n    \"isHuman\" : true,\n    \"age\": 32,\n    \"address\" : \"I'll not tell you\",\n    hobbies : [ \n        null\n        , \"not reading \"+ parser.chars.missingPremitive +\" book\"\n        , \"watching \\\\\"+ parser.chars.nilPremitive +\" movie\"\n    ],\n    project : {\n        title : \"nimn\",\n        //description : \"it is 80% smaller\",\n        status : \"rocking\"\n    }\n}]\n\nvar nimnDataString = nimn.stringify(schema, jData);\nvar result = nimn.parse(schema, nimnDataString);\nexpect(result).toEqual(jData); \n```\n\n### Flexibility\n\n* You can use old schema to parse nimn data created with old or new schema.\n* You can use new schema to parse nimn data created with old or new schema.\n\nNote that the fields must be added or deleted in the end of the map (object)\n\n* Fields name can be chaged in the schema used for encoding and decoding. But their type and order must not be changed.\n\n**Supported type**\n\n* *map* : Fixed key value pairs\n* *varmap* : Variable key value pairs where the values of any key have same structure\n* *list* : list of similar values\n* *boolean* : true / false\n* *string* : Any valid string\n* *number* : Any valid number\n\nInclude [dist](dist/nimn.js) in your HTML to use it in browser.\n\n\nCheck the [demo](https://amitkumargupta.work/nimn/) for instant use. It generates schema automatically with the help of [schema builder](https://github.com/NaturalIntelligence/nimnjs-schema-builder) when sample json is provided.\n\n\n## Support\nJoin the [official organization](https://github.com/NaturalIntelligence) on github to support it. It can not only save bandwidth but speed up communication, search and much more.\n","publish_time":1524748119859,"_cnpm_publish_time":1524748119859,"dist-tags":{"latest":"2.2.1"}}