Comparing version 0.0.0 to 0.0.1
{ | ||
"name": "cbor", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "NPM package for encoding and decoding CBOR (Concise Binary Object Representation) data.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "mocha test" | ||
}, | ||
"repository": "", | ||
"repository": "https://github.com/dotCypress/cbor", | ||
"keywords": [ | ||
"CBOR" | ||
], | ||
"author": "Vitaly Domnikov", | ||
"license": "BSD", | ||
"readmeFilename": "README.md" | ||
"author": { | ||
"name": "Vitaly Domnikov", | ||
"email": "dotcypress@gmail.com" | ||
}, | ||
"license": "MIT", | ||
"readmeFilename": "README.md", | ||
"devDependencies": { | ||
"mocha": "~1.13.0", | ||
"memorystream": "~0.2.0" | ||
}, | ||
"dependencies": { | ||
"lodash": "~2.4.1", | ||
"node-int64": "~0.3.0" | ||
} | ||
} |
@@ -1,4 +0,70 @@ | ||
# cbor | ||
# cbor [![Build Status](https://secure.travis-ci.org/dotCypress/cbor.png?branch=master)](https://travis-ci.org/dotCypress/cbor) | ||
NPM package for encoding and decoding CBOR (Concise Binary Object Representation) data. This | ||
package implements CBOR as described in [RFC 7049](http://tools.ietf.org/html/rfc7049). | ||
package implements CBOR as described in [RFC 7049](http://tools.ietf.org/html/rfc7049). | ||
__Not ready for production__ | ||
## Installation | ||
If you have npm installed, you can simply type: | ||
``` | ||
npm install cbor | ||
``` | ||
Or you can clone this repository using the git command: | ||
``` | ||
git clone git://github.com/dotCypress/cbor.git | ||
``` | ||
## Usage | ||
Some examples how to use cbor module. | ||
### Encode | ||
```js | ||
cbor.encode(value, writableStream, callback); | ||
``` | ||
Arguments: | ||
* ```value``` - value for encode | ||
* ```writableStream``` - [instance of writable stream](http://nodejs.org/api/stream.html#stream_class_stream_writable) | ||
* ```callback``` - callback function | ||
#### Semantic encode | ||
```js | ||
cbor.encodeSemantic(tag, value, writableStream, callback); | ||
``` | ||
Arguments: | ||
* ```tag``` - semantic tag (integer) | ||
* ```value``` - value for encode | ||
* ```writableStream``` - [instance of writable stream](http://nodejs.org/api/stream.html#stream_class_stream_writable) | ||
* ```callback``` - callback function | ||
#### Samples | ||
```js | ||
var cbor = require("cbor"); | ||
var writableStream = ...; | ||
var cb = ...; | ||
// simple encoding | ||
cbor.encode(1, writableStream, cb); // integers | ||
cbor.encode(-50, writableStream, cb); // integers | ||
cbor.encode(1.1, writableStream, cb); // floats | ||
cbor.encode([123, 567, 'hello'], writableStream, cb); // arrays | ||
cbor.encode({'a': 1, 'b': 2}, writableStream, cb); // hashes | ||
cbor.encode(new Buffer([1,2,3,4]), writableStream, cb); // binary data | ||
// semantic encode | ||
cbor.encodeSemantic(0, "2013-03-21T20:04:00Z", writableStream, cb); | ||
``` | ||
## Known issues | ||
* All floats will be serialized only as IEEE 754 Double-Precision Float (64 bits follow) | ||
* Encode does't support indefinite-length values. | ||
## License | ||
MIT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
13777
10
0
0
300
2
71
2
2
+ Addedlodash@~2.4.1
+ Addednode-int64@~0.3.0
+ Addedlodash@2.4.2(transitive)
+ Addednode-int64@0.3.3(transitive)