forked from maxtaco/purepack
-
Notifications
You must be signed in to change notification settings - Fork 4
/
package.json
46 lines (46 loc) · 3.57 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
"name": "purepack",
"version": "1.0.6",
"description": "A browserify, Pure JS implementation of msgpack spec v5",
"homepage": "https://github.com/keybase/purepack",
"main": "lib/main",
"repository": {
"type": "git",
"url": "https://github.com/keybase/purepack.git"
},
"directories": {
"lib": "lib"
},
"scripts": {
"test": "make test"
},
"engines": {
"node": ">=0.10.0"
},
"types": "./index.d.ts",
"devDependencies": {
"browserify": "*",
"colors": "*",
"deep-equal": "*",
"iced-coffee-script": "*",
"iced-runtime": "^1.0.2",
"iced-test": "*",
"iced-utils": "*",
"icsify": "*",
"msgpack": "*",
"optimist": "*"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
}
],
"readme": "purepack\n========\n\nA pure CoffeeScript implemented of Msgpack.\n\nWe've made one addition to the spec. When reserved byte `0xc4` prefaces\na raw string, the subsequent value is to be interepreted as raw bytes, and\nnot a UTF-8 string.\n\nTo force this behavior on the packing side, feed a Uint8Array to the packer\n(instead of a regular string). Uint8Arrays will automatically be returned\nfrom unpacking.\n\n## Install\n\n npm install purepack\n\n## Where To Use it\n\nTested and works with [browserify](https://github.com/substack/node-browserify), so\nit's useful for packing and unpacking structures on the browser-side. It also works\nserver-side in `node` processes. In either case, it finds the fastest buffer\nobjects at its disposal to give you the best performance possible.\n\n## API\n\n### purepack.pack(obj,encoding,opts)\n\nPack an object `obj`.\n\n##### encoding\n\nAfter packing, output the result according to the given encoding. Encodings include\n\n* `buffer` — Output as a `buffer.Buffer` on node, or a `Uint8Array` buffer in a browser\n* `base64` — Output as a standard base64-encoded string (with `+` and `/` outputs at positions 62 and 63)\n* `base64a` — Output as base64-encoding, with `@` and `_` characters rather than\nthe `+` and `/` characters. Better for URLs.\n* `base64x` — Output as base64-encoding, with `+` and `-` characters rather than\nthe `+` and `/` characters. Better for filenames.\n* `base32` — [sfs](https://github.com/okws/sfslite)-style base32-encoding\n* `hex` — Standard base16/hex encoding\n* `binary` — Output as a binary string. Beware, UTF-8 problems ahead!\n* `ui8a` — Synonym for `buffer` on the browser, or output to a `Uint8Array` on node.\n\n##### opts\n\nThere are two options currently supported, off by default:\n\n* `floats` — Use floats rather than doubles when encoding. Useful when saving space\n* `byte_arrays` — Encode Uint8Arrays differently from UTF-8 strings, using the `0xc4`\nprefix described above.\n\n### purepack.unpack(obj,encoding)\n\nUnpack a packed object `obj`, which has been packed and encoded according to the \ngiven `encoding`. See above for possibilities. Returns a pair `[err,res]`. `err`\nwill be `null` if the unpacking succeeded, or will be non-null and a description\nif there was an unpacking error. \n\n## Building\n\n make setup\n make\n\n## Testing\n\n make setup\n make\n make test\n\nTesting will run a series of scripts on your machine using `node`. It also will\nask you to visit a URL with whichever browsers you please to test `purepack` \nuse via `browserify` and with your browser's buffer objects. ",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/maxtaco/purepack/issues"
},
"_id": "purepack@0.0.20",
"_from": "purepack@*"
}