New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@atom/plist

Package Overview
Dependencies
Maintainers
13
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atom/plist

Mac OS X Plist parser/builder for NodeJS. Convert a Plist file or string into a native JS object and native JS object into a Plist file.

  • 0.4.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24
increased by9.09%
Maintainers
13
Weekly downloads
 
Created
Source

node-plist

Provides facilities for reading and writing Mac OS X Plist (property list) files. These are often used in programming OS X and iOS applications, as well as the iTunes configuration XML file.

Plist files represent stored programming "object"s. They are very similar to JSON. A valid Plist file is representable as a native JavaScript Object and vice-versa.

Tests

npm test

Usage

Parsing a plist from filename

var plist = require('plist');

var obj = plist.parseFileSync('myPlist.plist');
console.log(JSON.stringify(obj));

Parsing a plist from string payload

var plist = require('plist');

var obj = plist.parseStringSync('<plist><string>Hello World!</string></plist>');
console.log(obj);  // Hello World!

Given an existing JavaScript Object, you can turn it into an XML document that complies with the plist DTD

var plist = require('plist');

console.log(plist.build({'foo' : 'bar'}).toString());

Deprecated methods

These functions work, but may be removed in a future release. version 0.4.x added Sync versions of these functions.

Parsing a plist from filename

var plist = require('plist');

plist.parseFile('myPlist.plist', function(err, obj) {
  if (err) throw err;

  console.log(JSON.stringify(obj));
});

Parsing a plist from string payload

var plist = require('plist');

plist.parseString('<plist><string>Hello World!</string></plist>', function(err, obj) {
  if (err) throw err;

  console.log(obj[0]);  // Hello World!
});

Keywords

FAQs

Package last updated on 05 Apr 2019

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