@plist/parse
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@plist/parse

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

workflow npm npm NPM

About

This library adapts logic and test cases from plist.js.

Installation

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

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

Usage

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

const dict = parse(`<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
  <key>hello</key>
  <true/>
</dict>
</plist>`);
// => { hello: true }
import { detectFormat } from '@plist/parse';

const format = detectFormat(`{ hello = world; }`);
// => PlistFormat.OPENSTEP

Package Sidebar

Install

npm i @plist/parse

Weekly Downloads

1,104

Version

1.1.0

License

BSD-3-Clause-Clear

Unpacked Size

9.34 kB

Total Files

10

Last publish

Collaborators

  • mat-sz