Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@expo/plist

Package Overview
Dependencies
Maintainers
26
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/plist

Mac OS X Plist parser/builder for Node.js and browsers

  • 0.0.1-canary-20240411-33a7dc1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3M
decreased by-6.19%
Maintainers
26
Weekly downloads
 
Created

What is @expo/plist?

@expo/plist is a utility library for parsing and building property list (plist) files, which are commonly used in macOS and iOS applications for configuration. This package allows you to easily read, write, and manipulate plist files in both XML and binary formats.

What are @expo/plist's main functionalities?

Parsing XML Plist

This feature allows you to parse an XML plist string into a JavaScript object. The example demonstrates parsing a simple XML plist string containing a dictionary with one key-value pair.

const plist = require('@expo/plist');
const xml = '<plist version="1.0"><dict><key>foo</key><string>bar</string></dict></plist>';
const parsed = plist.parse(xml);
console.log(parsed); // { foo: 'bar' }

Building XML Plist

This feature allows you to build an XML plist string from a JavaScript object. The example demonstrates converting a simple JavaScript object into an XML plist string.

const plist = require('@expo/plist');
const obj = { foo: 'bar' };
const xml = plist.build(obj);
console.log(xml); // <plist version="1.0"><dict><key>foo</key><string>bar</string></dict></plist>

Parsing Binary Plist

This feature allows you to parse a binary plist file into a JavaScript object. The example demonstrates reading a binary plist file from the filesystem and parsing it.

const plist = require('@expo/plist');
const fs = require('fs');
const buffer = fs.readFileSync('example.plist');
const parsed = plist.parse(buffer);
console.log(parsed);

Building Binary Plist

This feature allows you to build a binary plist file from a JavaScript object. The example demonstrates converting a simple JavaScript object into a binary plist file and writing it to the filesystem.

const plist = require('@expo/plist');
const fs = require('fs');
const obj = { foo: 'bar' };
const buffer = plist.build(obj, { format: 'binary' });
fs.writeFileSync('example.plist', buffer);

Other packages similar to @expo/plist

Keywords

FAQs

Package last updated on 11 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc