fast-plist is a JavaScript library designed for rapidly parsing Apple Property List (PLIST) files. Currently at version 0.1.3, this package has a very low release cadence, with its last update approximately three years ago. It focuses solely on parsing XML-formatted PLISTs efficiently, providing a straightforward API for converting PLIST XML strings into JavaScript objects. While it is maintained by Microsoft (suggesting reliability for its niche), its lack of recent updates means it may not incorporate the latest performance optimizations or features found in more actively developed PLIST parsing libraries, nor does it explicitly support binary PLIST formats. It ships with TypeScript type definitions, making it compatible with modern TypeScript projects, though its primary usage examples are CommonJS-based.
npm install fast-plistVerified import paths — ran on the pinned version, not inferred.
Demonstrates parsing a well-formed XML PLIST string into a JavaScript object and handling errors for malformed input.
Thoroughly test in your target environment. Consider auditing the code or evaluating more actively maintained alternatives if security or compatibility with very recent runtimes is critical.
For Node.js ESM projects, ensure your build setup correctly handles CommonJS dependencies. You might need to use dynamic `import()` or configure your bundler (e.g., Webpack, Rollup, esbuild) to resolve CommonJS modules. If using TypeScript, ensure your `tsconfig.json`'s `moduleResolution` is set appropriately (e.g., 'Bundler' or 'NodeNext').
If you need to work with binary PLISTs, consider using alternative libraries like `bplist-parser` or `@expo/plist` which offer support for both XML and binary formats.
Ensure the input string is a well-formed XML PLIST. The parser is strict and expects valid XML structure from the beginning.
If in an ESM file, change `const parse = require('fast-plist').parse;` to `import { parse } from 'fast-plist';`. If this persists with bundlers, ensure your build configuration is set up to correctly handle CommonJS modules within an ESM project, or consider downgrading your module system to CommonJS if possible for the specific file.No dependency data recorded yet.