
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@atom/plist
Advanced tools
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.
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.
npm test
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());
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!
});
FAQs
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.
We found that @atom/plist demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.