Gathering detailed insights and metrics for purepack
Gathering detailed insights and metrics for purepack
Gathering detailed insights and metrics for purepack
Gathering detailed insights and metrics for purepack
npm install purepack
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (50.72%)
CoffeeScript (47.99%)
Makefile (0.99%)
HTML (0.31%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
1 Stars
185 Commits
4 Forks
6 Watchers
7 Branches
Updated on Jan 22, 2025
Latest Version
1.0.6
Package Id
purepack@1.0.6
Size
40.35 kB
NPM Version
6.13.2
Node Version
12.13.1
Published on
Jan 27, 2020
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A pure CoffeeScript implemented of Msgpack.
We've made one addition to the spec. When reserved byte 0xc4
prefaces
a raw string, the subsequent value is to be interepreted as raw bytes, and
not a UTF-8 string.
To force this behavior on the packing side, feed a Uint8Array to the packer (instead of a regular string). Uint8Arrays will automatically be returned from unpacking.
npm install purepack
Tested and works with browserify, so
it's useful for packing and unpacking structures on the browser-side. It also works
server-side in node
processes. In either case, it finds the fastest buffer
objects at its disposal to give you the best performance possible.
Pack an object obj
.
After packing, output the result according to the given encoding. Encodings include
buffer
— Output as a buffer.Buffer
on node, or a Uint8Array
buffer in a browserbase64
— Output as a standard base64-encoded string (with +
and /
outputs at positions 62 and 63)base64a
— Output as base64-encoding, with @
and _
characters rather than
the +
and /
characters. Better for URLs.base64x
— Output as base64-encoding, with +
and -
characters rather than
the +
and /
characters. Better for filenames.base32
— sfs-style base32-encodinghex
— Standard base16/hex encodingbinary
— Output as a binary string. Beware, UTF-8 problems ahead!ui8a
— Synonym for buffer
on the browser, or output to a Uint8Array
on node.There are two options currently supported, off by default:
floats
— Use floats rather than doubles when encoding. Useful when saving spacebyte_arrays
— Encode Uint8Arrays differently from UTF-8 strings, using the 0xc4
prefix described above.Unpack a packed object obj
, which has been packed and encoded according to the
given encoding
. See above for possibilities. Returns a pair [err,res]
. err
will be null
if the unpacking succeeded, or will be non-null and a description
if there was an unpacking error.
make setup
make
make setup
make
make test
Testing will run a series of scripts on your machine using node
. It also will
ask you to visit a URL with whichever browsers you please to test purepack
use via browserify
and with your browser's buffer objects.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
project is archived
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
19 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More