JSPM

@plist/parse

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11306
  • Score
    100M100P100Q134495F
  • License BSD-3-Clause-Clear

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

Package Exports

  • @plist/parse

Readme

@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