Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cbor

Package Overview
Dependencies
Maintainers
3
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cbor - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

.travis.yml

1

lib/BufferStream.js

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 1.7.1
(function() {

@@ -3,0 +2,0 @@ var BufferStream, EMPTY, assert, createEOF, stream, util,

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 1.7.1
(function() {

@@ -3,0 +2,0 @@ exports.Diagnose = require('./diagnose');

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 1.7.1
(function() {

@@ -3,0 +2,0 @@ this.MT = (function() {

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 1.7.1
(function() {

@@ -3,0 +2,0 @@ var BufferStream, DEFAULT_TAG_FUNCS, Decoder, Evented, MINUS_ONE, MT, TAG, TEN, TWO, Tagged, bignumber, f, k, stream, url, utils, v, _ref,

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 1.7.1
(function() {

@@ -3,0 +2,0 @@ var BufferStream, Diagnose, Evented, Simple, stream, utils,

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 1.7.1
(function() {

@@ -3,0 +2,0 @@ var BufferStream, DOUBLE, Encoder, FALSE, MT, NULL, NUM_BYTES, SHIFT32, Simple, TAG, TRUE, Tagged, UNDEFINED, bignumber, constants, stream, url,

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 1.7.1
(function() {

@@ -3,0 +2,0 @@ var BREAK, BufferStream, Evented, MT, Simple, assert, async, constants, stream, utils,

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 1.7.1
(function() {

@@ -3,0 +2,0 @@ var Simple, constants;

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 1.7.1
(function() {

@@ -3,0 +2,0 @@ var Tagged;

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 1.7.1
(function() {

@@ -3,0 +2,0 @@ var SHIFT32, bignumber, parseHalf,

{
"name": "cbor",
"version": "0.3.0",
"version": "0.3.1",
"description": "Encode and parse CBOR documents.",
"main": "./lib/cbor.js",
"repository" :
{
"type" : "git",
"url" : "http://github.com/hildjj/node-cbor.git"
"repository": {
"type": "git",
"url": "http://github.com/hildjj/node-cbor.git"
},

@@ -20,4 +19,5 @@ "homepage": "http://hildjj.github.io/node-cbor/",

"scripts": {
"test": "./node_modules/.bin/nodeunit test",
"prepublish": "coffee -c -o lib src"
"test": "grunt test",
"ci": "grunt ci",
"prepublish": "grunt coffee"
},

@@ -33,8 +33,13 @@ "keywords": [

},
"contributors": [
"Patrick Gansterer <paroga@paroga.com> (http://paroga.com/)"
],
"devDependencies": {
"coffee-script": "*",
"nodeunit": "*",
"covershot": "*",
"temp": "*",
"node-jsmeter": "git://github.com/hildjj/node-jsmeter.git"
"grunt": "~0.4.3",
"grunt-cli": "~0.1.13",
"grunt-contrib-coffee": "~0.10.1",
"grunt-contrib-nodeunit": "~0.3.2",
"grunt-coveralls": "~0.3.0",
"grunt-shell": "~0.6.4",
"temp": "~0.7.0"
},

@@ -45,4 +50,4 @@ "license": "MIT",

"async": "~0.2.9",
"bignumber.js": "~1.0.1"
"bignumber.js": "~1.3.0"
}
}

@@ -1,6 +0,6 @@

Encode and parse [CBOR](http://tools.ietf.org/html/draft-bormann-coap-misc-24#appendix-D.6.2) documents.
Encode and parse [CBOR](http://tools.ietf.org/html/rfc7049) documents.
See the [documentation](http://hildjj.github.io/node-cbor/doc/) and [test results](http://hildjj.github.io/node-cbor/covershot/).
Installation:
------------

@@ -11,2 +11,6 @@ ```

Documentation:
-------------
See the full API [documentation](http://hildjj.github.io/node-cbor/doc/).
From the command line:

@@ -120,2 +124,30 @@ ```

Test coverage is currently above 95%.
Developers
----------
For the moment, you'll need to manually install istanbul, nodeunit, and grunt-cli:
```
$ npm install -g grunt-cli nodeunit istanbul
$ grunt
Running "coffee:compile" (coffee) task
Running "nodeunit:all" (nodeunit) task
Testing BufferStream.test...............OK
Testing decoder.test.....OK
Testing diagnose.test...OK
Testing encoder.test.......OK
Testing evented.test....OK
Testing simple.test.OK
Testing tagged.test..OK
Testing utils.test.......OK
>> 459 assertions passed (129ms)
Done, without errors.
```
[![Build Status](https://api.travis-ci.org/hildjj/node-cbor.png)](https://travis-ci.org/hildjj/node-cbor)
[![Coverage Status](https://coveralls.io/repos/hildjj/node-cbor/badge.png?branch=master)](https://coveralls.io/r/hildjj/node-cbor?branch=master)
[![Dependency status](https://david-dm.org/hildjj/node-cbor/status.png)](https://david-dm.org/hildjj/node-cbor#info=dependencies&view=table)
[![Dev Dependency Status](https://david-dm.org/hildjj/node-cbor/dev-status.png)](https://david-dm.org/hildjj/node-cbor#info=devDependencies&view=table)

@@ -1,4 +0,3 @@

var csrequire = require('covershot').require.bind(null, require);
var BufferStream = csrequire('../lib/BufferStream');
var utils = csrequire('../lib/utils');
var BufferStream = require('../lib/BufferStream');
var utils = require('../lib/utils');
var fs = require('fs');

@@ -5,0 +4,0 @@

@@ -6,4 +6,3 @@ /*jslint node: true */

var csrequire = require('covershot').require.bind(null, require);
var cbor = csrequire('../lib/cbor');
var cbor = require('../lib/cbor');
var Decoder = cbor.Decoder;

@@ -10,0 +9,0 @@ var Simple = cbor.Simple;

/*jslint node: true */
"use strict";
var csrequire = require('covershot').require.bind(null, require);
var Diagnose = csrequire('../lib/diagnose');
var BufferStream = csrequire('../lib/BufferStream');
var Diagnose = require('../lib/diagnose');
var BufferStream = require('../lib/BufferStream');
var async = require('async');

@@ -8,0 +7,0 @@

/*jslint node: true */
"use strict";
var csrequire = require('covershot').require.bind(null, require);
var cbor = csrequire('../lib/cbor');
var cbor = require('../lib/cbor');
var Encoder = cbor.Encoder;
var Simple = cbor.Simple;
var Tagged = cbor.Tagged;
var hex = csrequire('../lib/utils').hex;
var hex = require('../lib/utils').hex;
var url = require('url');
var async = require('async');
var bignumber = require('bignumber.js');
var BufferStream = csrequire('../lib/BufferStream');
var BufferStream = require('../lib/BufferStream');

@@ -15,0 +14,0 @@ // If you pass a function as expected, catch errors and pass them

@@ -7,8 +7,7 @@ /*jslint node: true */

var csrequire = require('covershot').require.bind(null, require);
var cbor = csrequire('../lib/cbor');
var cbor = require('../lib/cbor');
var Evented = cbor.Evented;
var hex = csrequire('../lib/utils').hex;
var hex = require('../lib/utils').hex;

@@ -15,0 +14,0 @@ exports.input_string = function(test) {

/*jslint node: true */
"use strict";
var csrequire = require('covershot').require.bind(null, require);
var cbor = csrequire('../lib/cbor');
var cbor = require('../lib/cbor');

@@ -7,0 +6,0 @@ exports.create = function(test) {

/*jslint node: true */
"use strict";
var csrequire = require('covershot').require.bind(null, require);
var cbor = csrequire('../lib/cbor');
var cbor = require('../lib/cbor');

@@ -7,0 +6,0 @@ exports.create = function(test) {

/*jslint node: true */
"use strict";
var assert = require('nodeunit').assert;
var csrequire = require('covershot').require.bind(null, require);
var utils = csrequire('../lib/utils');
var utils = require('../lib/utils');
var bignumber = require('bignumber.js');

@@ -11,8 +9,2 @@ var hex = utils.hex;

assert.approx = function(actual, expected, message) {
if (Math.abs(actual - expected) > (actual / 1000.0)) {
assert.fail(actual, expected, message, "Not approximately equal");
}
}
exports.bin = function(test) {

@@ -57,3 +49,3 @@ test.deepEqual(utils.bin('1'), hex('01'));

test.deepEqual(utils.parseHalf(bin('0 11110 1111111111')), 65504);
test.approx(utils.parseHalf(bin('0 00001 0000000000')), 6.10352E-5);
test.deepEqual(utils.parseHalf(bin('0 00001 0000000000')), 0.00006103515625);
test.deepEqual(utils.parseHalf(bin('0 00000 0000000000')), 0);

@@ -60,0 +52,0 @@ test.deepEqual(utils.parseHalf(bin('1 00000 0000000000')), -0);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc