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

1.1.0 • Public • Published

@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>
*/

Package Sidebar

Install

npm i @plist/serialize

Weekly Downloads

1,080

Version

1.1.0

License

BSD-3-Clause-Clear

Unpacked Size

5.92 kB

Total Files

10

Last publish

Collaborators

  • mat-sz