Skip to content
/ plist Public

πŸ“ An universal TypeScript library for handing Apple's Property Lists. Supports binary, text and XML plists; works well in both browser and node.

License

Notifications You must be signed in to change notification settings

mat-sz/plist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Dec 4, 2024
ee5f6b0 Β· Dec 4, 2024

History

19 Commits
Jan 9, 2024
Jan 9, 2024
Jun 24, 2022
Dec 4, 2024
Jan 9, 2024
Jan 9, 2024
Jun 24, 2022
Jan 9, 2024
Jan 9, 2024
Jan 9, 2024
Jan 10, 2024
Jan 10, 2024
Jan 9, 2024
Jan 10, 2024

Repository files navigation

@plist/plist

An universal TypeScript library for handing Apple's Property Lists. Supports binary, text and XML plists; works well in both browser and node.

workflow npm npm NPM

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:

Environment Version
Chrome/Chromium 67+
Edge 79+
Firefox 100+
Internet Explorer Not supported
Opera 54+
Safari 14.1+ (iOS 14.1+, macOS 11.1+)
Deno 1.0+
node.js 16.5.0+