{"name":"nimnjs","version":"2.2.1","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/NaturalIntelligence/nimnjs.git"},"bugs":{"url":"https://github.com/NaturalIntelligence/nimnjs/issues"},"homepage":"https://amitkumargupta.work/nimn/","dependencies":{"nimn-date-parser":"^1.0.0","nimn_schema_builder":"^1.1.0"},"devDependencies":{"benchmark":"^2.1.4","browserify":"^16.2.3","cbor":"^4.1.1","istanbul":"^0.4.5","jasmine":"^3.3.0","jasmine-core":"^2.99.1","msgpack":"^1.0.2","notepack.io":"^2.1.3","pbf":"^3.1.0","protocol-buffers":"^4.1.0"},"gitHead":"e097156f1116b3b7f3988547e8b7f5023c68d2f8","_id":"nimnjs@2.2.1","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-erb70TUUW+XbYPVWkzQpklyGZrk7is3sL/erAquzb1WRBkkWpIGbtvKhsW/Zjm4vTkYzjwBbvU9WQus5l1ZIjQ==","shasum":"da232b038dcc28b6e379844cf839618899eec266","tarball":"http://registry-npm.ywwl.com/nimnjs/download/nimnjs-2.2.1.tgz","fileCount":14,"unpackedSize":24515,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHgYEYl/2uI1fKVysp5z0OJ0fV3F21yeHqOz5rbqvBpfAiBTQz9M5/Abz5yHfNrBcuZ82V3LbzKxFsAkEAbjFbf5uw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikjFsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQSQ/+Pm6k5gnB20f3e1cFoUsapEk9rXyoJaZmHLzkkGRkdp/4IeW7\r\nNsdngd6ES1WQ8wRelpg9F2UgrHpRunHXFmrEUs3OfWvo4DN8EC/eISSL2UvJ\r\nzhtueb6E+E47GDQgg+mrioVU68/OuOrgvF52yfKqYvpJmzb5Qj/kAWgJWhMx\r\n2iAdhT/juqnFaGQbskQgMiW82PLHH//VYBKkLOa7dYtTH3Gp9lTBX0epVWxb\r\nXFBF0b3YpgiipM1GX2ArxpS/Q7+V81CQu5qfTSP0S6gK5wAgcbX3lGvLbIoK\r\nLpqq2acZBOkc9eLl0BEskE3GilAHmWA0InoLB0aAQcI2y4jn3zETLpvB/+RL\r\n1f9M2LONK97Z4O8gsJ2B4GYNTGZHUqjJd/ha/MbaPEs9iMd5fOTQ8NU+H3kr\r\n1ItedM3miLpOwETgl6c6EZyzS0y217NiHTewAiz8MEP0ZlGPbTjhJGmlvFc6\r\nrWku3kfL/GTbaS9kUHQjLgSNhmDDL9IYkPeTzx2lyXBbCk1NaQ+HHHx9IJsX\r\n2CQ+nRGdqVRKv2QtWcPW8OuSLZpMe6bzRkt6HhcetT2AtKG/IZQ1JJZiaCyE\r\nItQqd2UqFpBpaRcMxjA3GCRREHNf6n/2oqZO5WXrdSwLorFDlBhAc5laF3/J\r\nsfpQmpdhkcZqBqav1BtnRGIITqVFhjPm3CQ=\r\n=5mQu\r\n-----END PGP SIGNATURE-----\r\n","size":6945,"noattachment":false,"key":"/nimnjs/-/nimnjs-2.2.1.tgz"},"_npmUser":{"name":"amitgupta","email":"amitgupta.gwl@gmail.com"},"directories":{},"maintainers":[{"name":"amitgupta","email":"amitgupta.gwl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nimnjs_2.2.1_1653748076155_0.32399192763641715"},"_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":1653748076328,"_cnpm_publish_time":1653748076328,"dist-tags":{"latest":"2.2.1"}}