{"_id":"cbor-js","_rev":"9-ca2cc3c5b7e439f17c16f70563b9815e","name":"cbor-js","description":"The Concise Binary Object Representation (CBOR) data format (RFC7049) implemented in pure JavaScript.","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"cbor-js","version":"0.1.0","description":"The Concise Binary Object Representation (CBOR) data format (RFC7049) implemented in pure JavaScript.","keywords":["cbor"],"homepage":"https://github.com/paroga/cbor-js","bugs":{"url":"https://github.com/paroga/cbor-js/issues"},"license":"MIT","author":{"name":"Patrick Gansterer","email":"paroga@paroga.com","url":"http://paroga.com/"},"main":"cbor.js","files":["cbor.js"],"repository":{"type":"git","url":"git+ssh://git@github.com/paroga/cbor-js.git"},"scripts":{"test":"grunt test","ci":"grunt ci"},"devDependencies":{"grunt":"~0.4.5","grunt-bower-install-simple":"~1.1.4","grunt-cli":"~0.1.13","grunt-contrib-compress":"~0.13.0","grunt-contrib-connect":"~0.11.2","grunt-contrib-jshint":"~0.11.2","grunt-contrib-qunit":"~0.7.0","grunt-contrib-uglify":"~0.9.1","grunt-coveralls":"~1.0.0","grunt-qunit-istanbul":"~0.4.7","grunt-saucelabs":"~8.6.1"},"gitHead":"86284cbc2baed31c6136f919394cb1823cf7b9f1","_id":"cbor-js@0.1.0","_shasum":"c80ce6120f387e8faa74370dfda21d965b8fc7f9","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"neothemachine","email":"maik.riechert@arcor.de"},"dist":{"shasum":"c80ce6120f387e8faa74370dfda21d965b8fc7f9","tarball":"https://registry.npmjs.org/cbor-js/-/cbor-js-0.1.0.tgz","integrity":"sha512-7sQ/TvDZPl7csT1Sif9G0+MA0I0JOVah8+wWlJVQdVEgIbCzlN/ab3x+uvMNsc34TUvO6osQTAmB2ls80JX6tw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDghNSYKWIO6wIpDweIaEf4lOhpcr/wPP2Fekj9n1uX8AIgd2U1oZjNqXkXfgJ5DicshQon9bkpb3vlMw5/FtrKZlo="}]},"maintainers":[{"name":"neothemachine","email":"maik.riechert@arcor.de"}]}},"readme":"cbor-js\n=======\n\nThe Concise Binary Object Representation (CBOR) data format ([RFC 7049](http://tools.ietf.org/html/rfc7049)) implemented in pure JavaScript.\n\n[![Build Status](https://api.travis-ci.org/paroga/cbor-js.svg)](https://travis-ci.org/paroga/cbor-js)\n[![Coverage Status](https://coveralls.io/repos/paroga/cbor-js/badge.svg?branch=master)](https://coveralls.io/r/paroga/cbor-js?branch=master)\n[![Dependency status](https://david-dm.org/paroga/cbor-js/status.svg)](https://david-dm.org/paroga/cbor-js#info=dependencies&view=table)\n[![Dev Dependency Status](https://david-dm.org/paroga/cbor-js/dev-status.svg)](https://david-dm.org/paroga/cbor-js#info=devDependencies&view=table)\n[![Selenium Test Status](https://saucelabs.com/buildstatus/paroga-cbor-js)](https://saucelabs.com/u/paroga-cbor-js)\n\n[![Selenium Test Status](https://saucelabs.com/browser-matrix/paroga-cbor-js.svg)](https://saucelabs.com/u/paroga-cbor-js)\n\nAPI\n---\n\nThe `CBOR`-object provides the following two functions:\n\nCBOR.**decode**(*data*)\n> Take the ArrayBuffer object *data* and return it decoded as a JavaScript object.\n\nCBOR.**encode**(*data*)\n> Take the JavaScript object *data* and return it encoded as a ArrayBuffer object.\n\nUsage\n-----\n\nInclude `cbor.js` in your or HTML page:\n```html\n<script src=\"path/to/cbor.js\" type=\"text/javascript\"></script>\n```\n\nThen you can use it via the `CBOR`-object in your code:\n```javascript\nvar initial = { Hello: \"World\" };\nvar encoded = CBOR.encode(initial);\nvar decoded = CBOR.decode(encoded);\n```\nAfter running this example `initial` and `decoded` represent the same value.\n\n### Combination with WebSocket\n\nThe API was designed to play well with the `WebSocket` object in the browser:\n```javascript\nvar websocket = new WebSocket(url);\nwebsocket.binaryType = \"arraybuffer\";\n...\nwebsocket.onmessage = function(event) {\n  var message = CBOR.decode(event.data);\n};\n...\nwebsocket.send(CBOR.encode(message));\n```\n","maintainers":[{"name":"letmaik","email":"maik.riechert@arcor.de"},{"name":"paroga","email":"paroga@paroga.com"}],"time":{"modified":"2022-06-13T05:43:12.969Z","created":"2016-01-08T11:50:19.203Z","0.1.0":"2016-01-08T11:50:19.203Z","0.1.1":"2016-09-14T14:44:02.138Z"},"homepage":"https://github.com/paroga/cbor-js","keywords":["cbor"],"repository":{"type":"git","url":"git+ssh://git@github.com/paroga/cbor-js.git"},"author":{"name":"Patrick Gansterer","email":"paroga@paroga.com","url":"http://paroga.com/"},"bugs":{"url":"https://github.com/paroga/cbor-js/issues"},"license":"MIT","readmeFilename":"README.md","users":{}}