{"_id":"cbor-sync","_rev":"13-04b4ceeb5c8917d037f7e5b8c7b22d53","name":"cbor-sync","description":"CBOR encode/decode (synchronous, semantic, browser-compatible)","dist-tags":{"latest":"1.0.4"},"versions":{"0.0.0":{"name":"cbor-sync","version":"0.0.0","description":"Encode/decode CBOR data (synchronously)","main":"main.js","scripts":{"test":"grunt mochaTest"},"devDependencies":{"grunt":"~0.4.1","chai":"~1.8.1","grunt-mocha-test":"~0.7.0"},"license":{"type":"MIT","url":"https://raw.github.com/ARM-RD/cbor-sync/master/LICENSE.txt"},"dependencies":{},"_id":"cbor-sync@0.0.0","dist":{"shasum":"885d48411e03400c81fc57246fb02ff38a025218","tarball":"https://registry.npmjs.org/cbor-sync/-/cbor-sync-0.0.0.tgz","integrity":"sha512-kldR3JXiGA+DgdHHUN2hq2y1WhGfIrbvpGEO7bmeYGBFaxqgHHTjSYK0jhzNB/mZqrgY2bNF5LTYoJSyS95kGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID7WOblQuSoxJFZv86FJucEKrVD/xrXqKhEcV2gJd1aVAiB3jbVxX1RVbaGrSh1YnBfpOF+/X8/60uc2ot2R0ZfGgA=="}]},"_from":".","_npmVersion":"1.4.0","_npmUser":{"name":"geraintluff","email":"luffgd@gmail.com"},"maintainers":[{"name":"geraintluff","email":"luffgd@gmail.com"}],"directories":{}},"0.0.1":{"name":"cbor-sync","version":"0.0.1","description":"Customisable encode/decode for CBOR data (synchronous)","keywords":["cbor"],"main":"main.js","scripts":{"test":"grunt mochaTest"},"devDependencies":{"grunt":"~0.4.1","chai":"~1.8.1","grunt-mocha-test":"~0.7.0"},"license":{"type":"MIT","url":"https://raw.github.com/ARM-RD/cbor-sync/master/LICENSE.txt"},"dependencies":{},"_id":"cbor-sync@0.0.1","dist":{"shasum":"f1abb3ea3e548e2da1858b46dbe353daacb47ac5","tarball":"https://registry.npmjs.org/cbor-sync/-/cbor-sync-0.0.1.tgz","integrity":"sha512-t3FfjGNU/TQPoYxO7lhNemOKaZe7TSP9uNbw0NTC6GkdsspCachvWahsNqwMs8OrP5i6c6uqH4EVGrPLrxJXwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEAE9UQ2mzIHwq8dSXmW2KQc9Fw+3bdQgHWYF4BtczIwIhAP5Xsdm/JoeeI5ndv89shfCodgcZy60K9WFlPOnNfQOM"}]},"_from":".","_npmVersion":"1.4.0","_npmUser":{"name":"geraintluff","email":"luffgd@gmail.com"},"maintainers":[{"name":"geraintluff","email":"luffgd@gmail.com"}],"directories":{}},"0.0.4":{"name":"cbor-sync","version":"0.0.4","description":"Customisable encode/decode for CBOR data (synchronous)","homepage":"https://github.com/ARM-RD/cbor-sync","bugs":{"url":"https://github.com/ARM-RD/cbor-sync/issues"},"keywords":["cbor"],"maintainers":[{"name":"geraintluff","email":"luffgd@gmail.com"}],"main":"main.js","scripts":{"test":"grunt mochaTest"},"devDependencies":{"grunt-cli":"~0.1.9","grunt":"~0.4.1","chai":"~1.8.1","grunt-mocha-test":"~0.7.0"},"repository":{"type":"git","url":"https://github.com/ARM-RD/cbor-sync.git"},"license":{"type":"MIT","url":"https://raw.github.com/ARM-RD/cbor-sync/master/LICENSE.txt"},"dependencies":{},"_id":"cbor-sync@0.0.4","dist":{"shasum":"1eca2cff5474a2b47fb1ff113f64b82cdd737b2c","tarball":"https://registry.npmjs.org/cbor-sync/-/cbor-sync-0.0.4.tgz","integrity":"sha512-y1CKGSlT8iYyCRRaDzzM4N90BNi0GWam/nxdtq3TabeYnwrTgaOVvkXWAh1cdaeGsEt6hqFClBAqtC4AadOu+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrzkE9y8RvuMGJzujnUPnvOsuKsGe+knXS1LVp7mBnzQIhAMZckSAuYt6i2JbBl4BzWnJS8B+Dd2GAiLjiYuFg4BL6"}]},"_from":".","_npmVersion":"1.4.0","_npmUser":{"name":"geraintluff","email":"luffgd@gmail.com"},"directories":{}},"1.0.2":{"name":"cbor-sync","version":"1.0.2","description":"CBOR encode/decode (synchronous, semantic, browser-compatible)","homepage":"https://github.com/ARM-RD/cbor-sync","bugs":{"url":"https://github.com/ARM-RD/cbor-sync/issues"},"keywords":["cbor"],"maintainers":[{"name":"geraintluff","email":"luffgd@gmail.com"}],"main":"main.js","scripts":{"test":"grunt mochaTest"},"devDependencies":{"grunt-cli":"~0.1.9","grunt":"~0.4.1","chai":"~1.8.1","grunt-mocha-test":"~0.7.0"},"repository":{"type":"git","url":"https://github.com/ARM-RD/cbor-sync.git"},"license":{"type":"MIT","url":"https://raw.github.com/ARM-RD/cbor-sync/master/LICENSE.txt"},"dependencies":{},"_id":"cbor-sync@1.0.2","dist":{"shasum":"5429606fb184017aed86ce94344460ef0083486a","tarball":"https://registry.npmjs.org/cbor-sync/-/cbor-sync-1.0.2.tgz","integrity":"sha512-Awd1Zeb4zu9bIc3AkK8zkG0y/OjgGGK3yz3EHiwJh1XgkjPoDvAqjlsKZnuhNWJ3jhXQE7cmJG1GGypLbCeh9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkq7lW0jQniS4mRGlzteCJcWW+tLPtVNr5pwN+rymoZwIgUfCsS44IxShaGG1MgVOSkvXcTc3wcKmNHZltaDBh2/w="}]},"_from":".","_npmVersion":"1.4.0","_npmUser":{"name":"geraintluff","email":"luffgd@gmail.com"},"directories":{}},"1.0.3":{"name":"cbor-sync","version":"1.0.3","description":"CBOR encode/decode (synchronous, semantic, browser-compatible)","homepage":"https://github.com/ARMmbed/cbor-sync","bugs":{"url":"https://github.com/ARMmbed/cbor-sync/issues"},"keywords":["cbor"],"maintainers":[{"email":"luffgd@gmail.com","name":"geraintluff"},{"email":"npm@thegecko.org","name":"thegecko"}],"main":"main.js","scripts":{"test":"grunt mochaTest"},"devDependencies":{"grunt-cli":"~0.1.9","grunt":"~0.4.1","chai":"~1.8.1","grunt-mocha-test":"~0.7.0"},"repository":{"type":"git","url":"git+https://github.com/ARMmbed/cbor-sync.git"},"license":{"type":"MIT","url":"https://raw.github.com/ARMmbed/cbor-sync/master/LICENSE.txt"},"dependencies":{},"gitHead":"0b3dcad537433f4099562dd549681abdb988aa39","_id":"cbor-sync@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"thegecko","email":"npm@thegecko.org"},"dist":{"integrity":"sha512-kzjz7ZH0uci3NvWDk846Vq1ZX6PFQft0IbI0rDdVCxU6tj0urLiM2EcsntPFKnGfOWQcihh84HUtGZA4lkmzCA==","shasum":"a9107c75b1712c5780f79ad4217145011252563c","tarball":"https://registry.npmjs.org/cbor-sync/-/cbor-sync-1.0.3.tgz","fileCount":17,"unpackedSize":34258,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmqudCRA9TVsSAnZWagAA/NoP/3fP4z2W7OlmZLr3Fncm\nWWNQqzthWYZnXUaaAjpwUDAA9WfNau8LwoI7HgvMwlrziuvBh2kVHA1Ww+6Z\nZFxMOx441cEPrp+TdkS/bCtp82ooG8hf1QNmZZuW98QdTV95nAAKKUgUOuK1\nRlbIK6+DmeIplIzxNEcRxEUCpK9KCiYyfWYDwTxCjsuzN7z+4e9RH6mJK1w0\n9/7XjCx97UTi2Cttx/3ZB2RuYJQEu+rGhu62COuQodygIYo0zgTYztcVt7XA\nrKd3Gpj3jaHKeAycU9LXruAQK5Zy+j5NLNv55DBmeWUdxb9lI6tn+Cb4sqlk\n9akvkLsmj9UQncN/uhCGNPzw/J3/xEHwKW6Z1gKiBJKrT72i2NoG0kYsC00w\n57dMrrOiTjCI+R+Nbok0ZY6WFOcRC94xaFNEWkG2f8CQS5NTrmC61h6amVYL\n9EzmWV2WKRntWHas+x+Fuu5DN61ICCtVpR6FDmdzSx857ahf56jFd843uS+P\nty8Xs94A4QZIqwG9i2AVpeLP5JALiEyVDEZMnFgbflIMniFE1xrckS3jZdr/\nfkuzaP33ZVFdL0s1hKIHxJJRDuhMgCjLUAZ0vV0KpZo8CuibfzQbuExy1De7\nYTrdtCUW20aL3m7zsPgt6YLf0gPH/SBZCba2bhlw20icVuSWaVTj74/KeotP\nXiGm\r\n=FjV4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAtz3WR9Aq0N6mkw+nue+NxgCqS03UkSm28FrHoaV/O5AiEA19LlmZQfjlTeFQhONPfWGwmZyBFGMGrVj8jceo880dI="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cbor-sync_1.0.3_1536863132947_0.0348066866841823"},"_hasShrinkwrap":false},"1.0.4":{"name":"cbor-sync","version":"1.0.4","description":"CBOR encode/decode (synchronous, semantic, browser-compatible)","homepage":"https://github.com/ARMmbed/cbor-sync","bugs":{"url":"https://github.com/ARMmbed/cbor-sync/issues"},"keywords":["cbor"],"maintainers":[{"email":"luffgd@gmail.com","name":"geraintluff"},{"email":"npm@thegecko.org","name":"thegecko"}],"main":"main.js","scripts":{"test":"grunt mochaTest"},"devDependencies":{"grunt-cli":"~0.1.9","grunt":"~0.4.1","chai":"~1.8.1","grunt-mocha-test":"~0.7.0"},"repository":{"type":"git","url":"git+https://github.com/ARMmbed/cbor-sync.git"},"license":{"type":"MIT","url":"https://raw.github.com/ARMmbed/cbor-sync/master/LICENSE.txt"},"dependencies":{},"gitHead":"35fdf44ce469ec34b7985f8463c806876fdb8d31","_id":"cbor-sync@1.0.4","_npmVersion":"6.4.1","_nodeVersion":"10.14.1","_npmUser":{"name":"thegecko","email":"npm@thegecko.org"},"dist":{"integrity":"sha512-GWlXN4wiz0vdWWXBU71Dvc1q3aBo0HytqwAZnXF1wOwjqNnDWA1vZ1gDMFLlqohak31VQzmhiYfiCX5QSSfagA==","shasum":"5a11a1ab75c2a14d1af1b237fd84aa8c1593662f","tarball":"https://registry.npmjs.org/cbor-sync/-/cbor-sync-1.0.4.tgz","fileCount":18,"unpackedSize":34846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0/i9CRA9TVsSAnZWagAA9/8P/R+VQ0e8oFm7GcNo4gs8\nidUy7rA2W37Pm9zvf77rRolQTjzudqol/eed0PvH6WnPn61/ZBrjmBX3q0gv\npHeMvRtZR+HdCu0aLwH49ScZdair4aql9VRsvWpkVHnzETxZR5lD/z+Hl6yn\nEnNQMYPJWgCqsbJVYYvHHHAJamc6+vIcXI6QwmtUhkzeFV6B528nLK280CNf\n4cAiyzMXDjidkxd8TV2kToa5NNqbUk8cnB6WWB/RK2Vb26UVddNjWlnglYoQ\nF9p75HUPMkbMsx+1otyZ3+Rok256wbt/+x2i5I7TfuNckYJldfM7ZBIXp4na\niKU3ThWKgyfxL5BbpKznF3vQO5hp0K87rhWG8Tgc6vXWh5FfhcaQTrA5Yj63\nd+mC05gQYi05VxQ5PNdPSUHjXsn2DXUv9mAUdaBPIqp71l/ivbamIE7Tr7HB\nmU5pUCy5O/HmmIVHqwVMsTm3Yh4m10w2ElnIxRaP242LZ+pt/Dhk9qOo6jVZ\n3LDNmbcM7HYxzWw4Dh0A1tqU8/mq4GnuLN5gcwzBwU8tqyjxQzgtD5daOJxs\nkKz+H1NLf5bad2GqvFfQKyMw67rz8jWWUneclJ7b8C5BargWWyBrFfO+XO8x\ntF7fkjLhvumBlRHMEiNIKdoCncJGxY6MMeKJQWn6qiArHFRZSu8RL4LeVgpJ\nHm7x\r\n=E0xa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAv0RG0HqH0LBBb+4gv91orfL76hw49M0PaYjdcyweL1AiAmu5Bb5ObqFLyPZIWkWcnx6YsllgyMqB8Q2s6Vx5YXCQ=="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cbor-sync_1.0.4_1557395645135_0.8460586782033104"},"_hasShrinkwrap":false}},"readme":"# Encode/decode CBOR\n\n[![Build Status](https://travis-ci.org/ARMmbed/cbor-sync.svg?branch=master)](https://travis-ci.org/ARMmbed/cbor-sync) [![NPM version](https://badge.fury.io/js/cbor-sync.png)](http://badge.fury.io/js/cbor-sync)\n\nThis package provides an extensible CBOR encoder/decoder.\n\n## Usage\n\n```javascript\nvar CBOR = require('cbor-sync');\n\nvar encodedBuffer = CBOR.encode({hello: 'world'});\nvar decodedObject = CBOR.decode(encodedBuffer);\n```\n\n## `toCBOR()`\n\nMuch like the `toJSON()` method, which allows objects to provide a replacement representation for encoding, this package checks for a `toCBOR()` method.\n\nNote that this step happens *after* any semantic-tagging/-replacement step, so a custom semantic encoder will always override an objects built-in `toCBOR()` method.\n\n## Semantic extensions\n\nCBOR provides a limited set of basic types (similar to JSON), but provides semantic tagging (optional for both encoder/decoder) that lets you annotate parts of the data so they can be decoded appropriately.\n\nHere is an example (from this module) for encoding Date objects as ISO strings:\n\n```javascript\n// 0 is the CBOR semantic tag number for date/time strings: https://tools.ietf.org/html/rfc7049#section-2.4\nCBOR.addSemanticEncode(0, function (data) {\n\tif (data instanceof Date) {\n\t\treturn data.toISOString();\n\t}\n});\nCBOR.addSemanticDecode(0, function (dateString) {\n\treturn new Date(dateString);\n});\n```\n\n## Known issues\n\n* All floats encoded as 64-bit, regardless of whether they strictly need to be\n","maintainers":[{"email":"luffgd@gmail.com","name":"geraintluff"},{"email":"npm@thegecko.org","name":"thegecko"}],"time":{"modified":"2022-06-13T05:43:13.977Z","created":"2014-02-27T14:20:57.664Z","0.0.0":"2014-02-27T14:20:57.664Z","0.0.1":"2014-02-27T14:25:13.236Z","0.0.4":"2014-06-16T17:47:11.578Z","1.0.2":"2014-06-19T17:10:05.875Z","1.0.3":"2018-09-13T18:25:33.084Z","1.0.4":"2019-05-09T09:54:05.316Z"},"license":{"type":"MIT","url":"https://raw.github.com/ARMmbed/cbor-sync/master/LICENSE.txt"},"readmeFilename":"README.md","keywords":["cbor"],"homepage":"https://github.com/ARMmbed/cbor-sync","repository":{"type":"git","url":"git+https://github.com/ARMmbed/cbor-sync.git"},"bugs":{"url":"https://github.com/ARMmbed/cbor-sync/issues"}}