0.1.0
Binary property list parsing with Deno, courtesy of https://github.com/joeferner/node-bplist-parser
Repository
Current version released
3 years ago
Dependencies
std
deno.land/x/bplist_parser
A Deno port for the
bplist-parser
NPM package. Parses
macOS binary property lists into
equivalent (non-binary) JavaScript values.
Usage
Parsing a bplist file from disk
import { parseFile } from "https://deno.land/x/bplist_parser@0.1.0/mod.ts";
const bplist = "./path/to/file.bplist";
const parsed = await parseFile(bplist);
// To make the path relative to the path of the current script, add
// `import.meta.url` as the cwd
const parsed2 = await parseFile(bplist, import.meta.url);
Parsing an in-memory bplist
import { parseBuffer } from "https://deno.land/x/bplist_parser@0.1.0/mod.ts";
const bplist: Uint8Array = await fetchFile(/*...*/);
const parsed = parseBuffer(data);
TODO
- Docs describing the supported bplist data types and what they deserialize into
Changelog
0.1.0
(May 30, 2022)- Started with https://github.com/joeferner/node-bplist-parser (v0.3.2)
- async/await
- Changed some names
- Inlined types
Deno.readFile
instead of Node’sfs
moduleArrayBuffer
s andDataView
s instead of NodeBuffer
s- Arrow syntax for scoped functions
- Some code DRYing
- Some notes / docs
- Rewrote tests to use Deno.test
- Reorganized tests
This module was adapted from https://github.com/joeferner/node-bplist-parser. The original license can be found in that repo’s README.
All additional work is copyright 2022 Connor Logan. All rights reserved.