npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

plist

v5.0.0

Published

Apple's property list parser/builder for Node.js and browsers

Readme

plist.js

Apple property list parser/builder for Node.js and browsers. Supports XML, binary (bplist00), and OpenStep formats.

CI npm npm bundle size

Try it in the browser →

Features

  • Parse XML, binary, and OpenStep plists — format is auto-detected
  • Build XML and binary plists from JavaScript objects
  • TypeScript — written in TypeScript with full type declarations
  • Browser-optimized — uses native DOMParser in browsers (zero dependencies)
  • Lightweight — ~4 KB gzipped in the browser

Install

npm install plist

Quick Start

import { parse, build } from 'plist';

// Parse any plist format (auto-detected)
const obj = parse('<plist version="1.0"><string>Hello!</string></plist>');
console.log(obj); // "Hello!"

// Build an XML plist from a JS object
const xml = build({ name: 'My App', version: 42 });
console.log(xml);

Parsing

XML Plists

import { readFileSync } from 'node:fs';
import { parse } from 'plist';

const xml = readFileSync('Info.plist', 'utf8');
const obj = parse(xml);

Binary Plists

Binary plists (bplist00) are auto-detected when passed as a Uint8Array or ArrayBuffer. You can also use parseBinary() directly:

import { readFileSync } from 'node:fs';
import { parse, parseBinary } from 'plist';

// Auto-detected from binary data
const buf = readFileSync('Info.plist');
const obj = parse(new Uint8Array(buf));

// Or use parseBinary() directly
const obj2 = parseBinary(new Uint8Array(buf));

OpenStep Plists

The old-style ASCII format (used by defaults read on macOS) is auto-detected when the input starts with { or (:

import { parse, parseOpenStep } from 'plist';

// Auto-detected
const obj = parse('{ CFBundleName = "My App"; CFBundleVersion = 42; }');

// Or use parseOpenStep() directly
const obj2 = parseOpenStep('( item1, item2, item3 )');

Building

XML Output

import { build } from 'plist';

const xml = build({
  CFBundleName: 'My App',
  CFBundleVersion: '1.0',
  LSRequiresIPhoneOS: true,
  UISupportedInterfaceOrientations: [
    'UIInterfaceOrientationPortrait',
    'UIInterfaceOrientationLandscapeLeft',
  ],
});

Output:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>CFBundleName</key>
    <string>My App</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UISupportedInterfaceOrientations</key>
    <array>
      <string>UIInterfaceOrientationPortrait</string>
      <string>UIInterfaceOrientationLandscapeLeft</string>
    </array>
  </dict>
</plist>

Binary Output

import { writeFileSync } from 'node:fs';
import { buildBinary } from 'plist';

const data = buildBinary({
  CFBundleName: 'My App',
  CFBundleVersion: '1.0',
});

writeFileSync('Info.plist', data);

Type Mapping

| Plist Type | JavaScript Type | |---|---| | <string> | string | | <integer> | number | | <real> | number | | <true/> / <false/> | boolean | | <date> | Date | | <data> | Uint8Array | | <array> | Array | | <dict> | Object |

Browser Usage

In bundled applications (Vite, webpack, etc.), just import normally — the browser-optimized build is selected automatically via conditional exports:

import { parse, build } from 'plist';

The browser build uses native DOMParser and string-based XML building, so @xmldom/xmldom and xmlbuilder are not included in the bundle.

Try the interactive playground →

API

parse(input)

Parse a plist. Format is auto-detected.

  • input: string | Uint8Array | ArrayBuffer
  • returns: PlistValue

parseBinary(data)

Parse a binary plist (bplist00).

  • data: Uint8Array
  • returns: PlistValue

parseOpenStep(input)

Parse an OpenStep/ASCII plist.

  • input: string
  • returns: PlistValue

build(obj, opts?)

Build an XML plist string.

  • obj: PlistValue
  • opts.pretty: boolean (default: true) — pretty-print with indentation
  • opts.indent: string (default: " ") — indentation string
  • opts.newline: string (default: "\n") — newline string
  • returns: string

buildBinary(obj)

Build a binary plist (bplist00).

  • obj: PlistValue
  • returns: Uint8Array

PlistValue

type PlistValue =
  | string
  | number
  | boolean
  | Date
  | Uint8Array
  | PlistValue[]
  | { [key: string]: PlistValue }
  | null;

License

MIT