JSPM

@plist/serialize

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

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

Package Exports

  • @plist/serialize

Readme

@plist/serialize

An universal TypeScript library for serializing 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/serialize is available on npm, you can install it with either npm or yarn:

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

Usage

import { serialize } from '@plist/serialize';
import { PlistFormat } from '@plist/common';

const xml = serialize(
  {
    dictionary: {
      hello: 'world',
    },
  },
  PlistFormat.XML
);
/* =>
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
  <key>hello</key>
  <string>world</string>
</dict>
</plist>
*/