Skip to content

Commit

Permalink
Update dependencies and copyright year and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
paroga committed Sep 14, 2016
1 parent 06e42df commit 06af6e4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "0.10"
- "6"
before_script:
- npm install -g grunt-cli
script:
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cbor",
"version": "0.1.0",
"version": "0.1.1",
"homepage": "https://github.com/paroga/cbor-js",
"authors": [
"Patrick Gansterer <paroga@paroga.com>"
Expand All @@ -20,6 +20,6 @@
"package.json"
],
"devDependencies": {
"qunit": "1.18.0"
"qunit": "1.23.1"
}
}
16 changes: 8 additions & 8 deletions cbor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Patrick Gansterer <paroga@paroga.com>
* Copyright (c) 2014-2016 Patrick Gansterer <paroga@paroga.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -96,7 +96,7 @@ function encode(value) {
writeUint64(length);
}
}

function encodeItem(value) {
var i;

Expand All @@ -108,7 +108,7 @@ function encode(value) {
return writeUint8(0xf6);
if (value === undefined)
return writeUint8(0xf7);

switch (typeof value) {
case "number":
if (Math.floor(value) === value) {
Expand Down Expand Up @@ -170,12 +170,12 @@ function encode(value) {
}
}
}

encodeItem(value);

if ("slice" in data)
return data.slice(0, offset);

var ret = new ArrayBuffer(offset);
var retView = new DataView(ret);
for (var i = 0; i < offset; ++i)
Expand All @@ -186,7 +186,7 @@ function encode(value) {
function decode(data, tagger, simpleValue) {
var dataView = new DataView(data);
var offset = 0;

if (typeof tagger !== "function")
tagger = function(value) { return value; };
if (typeof simpleValue !== "function")
Expand All @@ -207,14 +207,14 @@ function decode(data, tagger, simpleValue) {
var sign = value & 0x8000;
var exponent = value & 0x7c00;
var fraction = value & 0x03ff;

if (exponent === 0x7c00)
exponent = 0xff << 10;
else if (exponent !== 0)
exponent += (127 - 15) << 10;
else if (fraction !== 0)
return fraction * POW_2_24;

tempDataView.setUint32(0, sign << 16 | exponent << 13 | fraction << 13);
return tempDataView.getFloat32(0);
}
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cbor-js",
"version": "0.1.0",
"version": "0.1.1",
"description": "The Concise Binary Object Representation (CBOR) data format (RFC7049) implemented in pure JavaScript.",
"keywords": [
"cbor"
Expand All @@ -22,16 +22,16 @@
"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"
"grunt": "~1.0.1",
"grunt-bower-install-simple": "~1.2.3",
"grunt-cli": "~1.2.0",
"grunt-contrib-compress": "~1.3.0",
"grunt-contrib-connect": "~1.0.2",
"grunt-contrib-jshint": "~1.0.0",
"grunt-contrib-qunit": "~1.2.0",
"grunt-contrib-uglify": "~2.0.0",
"grunt-coveralls": "~1.0.1",
"grunt-qunit-istanbul": "~0.6.0",
"grunt-saucelabs": "~9.0.0"
}
}

0 comments on commit 06af6e4

Please sign in to comment.