0.2.1
Binary property list parsing with Deno, courtesy of https://github.com/joeferner/node-bplist-parser
Repository
Current version released
2 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,
parseFileSync,
} 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 parent folder of the currently running
// script, add `import.meta.url` as the cwd
const parsed2 = await parseFile(bplist, import.meta.url);
// The synchronous version accepts the same arguments
const parsed3 = parseFileSync(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 fetchFileSomehow(/*...*/);
const parsed = parseBuffer(data);
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.