binary-extract alternatives and similar modules
Based on the "Parsing" category.
Alternatively, view binary-extract alternatives based on common mentions on social networks and blogs.
-
markdown-it
Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed -
remark
markdown processor powered by plugins part of the @unifiedjs collective -
@parcel/css
An extremely fast CSS parser, transformer, bundler, and minifier written in Rust. -
parse5
HTML parsing/serialization toolset for Node.js. WHATWG HTML Living Standard (aka HTML5)-compliant. -
nearley
๐๐๐ฒ Simple, fast, powerful parser toolkit for JavaScript. -
fast-xml-parser
Validate XML, Parse XML and Build XML rapidly without C/C++ based libraries and no callback. -
google-libphonenumber
The up-to-date and reliable Google's libphonenumber package for node.js. -
csv-parser
Streaming csv parser inspired by binary-csv that aims to be faster than everyone else -
xlsx-populate
Excel XLSX parser/generator written in JavaScript with Node.js and browser support, jQuery/d3-style method chaining, encryption, and a focus on keeping existing workbook features and styles in tact. -
json-mask
Tiny language and engine for selecting specific parts of a JS object, hiding the rest. -
Awesome phonenumber parser
Google's libphonenumber pre-compiled with the closure compiler -
strip-json-comments
Strip comments from JSON. Lets you use comments in your JSON files! -
safe-json-value
โ๏ธ JSON serialization should never fail -
parsec ๐
๐ Tiniest body parser in the universe. Built for modern Node.js -
docx-to-pdf-on-AWS-Lambda
Microsoft Word doc/docx to PDF conversion on AWS Lambda using Node.js
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of binary-extract or a related project?
README
binary-extract
Extract one or more values from a buffer of json without parsing the whole thing.
Example
var extract = require('binary-extract');
var buf = new Buffer(JSON.stringify({
foo: 'bar',
bar: 'baz',
nested: {
bar: 'nope'
}
}));
var value = extract(buf, 'bar');
// => 'baz'
var values = extract(buf, ['foo', 'nested'])
// => ["bar", {"bar":"nope"}]
Perf
With the object from bench.js
, extract()
is ~2-4x faster than
JSON.parse(buf.toString())
. It is also way more memory efficient as the
blob stays out of the V8 heap.
The big perf gain comes mainly from not parsing everything and not converting the buffer to a string.
Installation
$ npm install binary-extract
API
extract(buf, keys)
Extract the value of keys
in the json buf
.
The value can be any valid JSON structure.
If keys
is a String, returns a value. If keys
is an Array of
keys, returns an array of values.
Sponsors
This module is proudly supported by my Sponsors!
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my Patreon. Not sure how much of my modules you're using? Try feross/thanks!
License
MIT
*Note that all licence references and agreements mentioned in the binary-extract README section above
are relevant to that project's source code only.