1.0.0 • Published 3 years ago

@plist/plist v1.0.0

Weekly downloads
-
License
BSD-3-Clause-Clea...
Repository
github
Last release
3 years ago

About

@plist/* adapts code, logic and test cases from:

I've decided to proceed with creating new libraries, instead of using those packages as dependencies, since it was necessary to modify the upstream code to remove reliance on node-only packages (mainly fs) and this would be too much of a change for anyone relying on the aforementioned libraries.

This library differs from other plist-related JavaScript libraries:

  • works on binary, text (OpenStep/NEXTStep), and XML plists
  • works in both node.js and browser environments (ArrayBuffer instead of Buffer, no usage of fs or other node-only libraries)

Installation

@plist/plist is available on npm, you can install it with either npm or yarn:

npm install @plist/plist
# or:
yarn install @plist/plist

Usage

import { parse, serialize } from '@plist/plist';

parse(serialize({ hello: 'world' })); // => { hello: 'world' }

Compatibility

This library relies on (relatively) new JavaScript features such as BigInt.

Therefore, without polyfills, those are the minimum browser and node/deno versions @plist/plist will work in:

EnvironmentVersion
Chrome/Chromium67+
Edge79+
Firefox100+
Internet ExplorerNot supported
Opera54+
Safari14.1+ (iOS 14.1+, macOS 11.1+)
Deno1.0+
node.js16.5.0+