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

plist

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plist

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

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is plist?

The plist npm package is a library for Node.js that allows users to parse and build XML Property List (plist) data. Property lists are a structured file format used primarily by macOS and iOS for storing serialized objects. The plist package provides functionality to convert between plist files and JavaScript objects, making it useful for tasks such as configuration management, data serialization, and interacting with Apple ecosystem data formats.

What are plist's main functionalities?

Parsing plist files

This feature allows you to read and parse plist files into JavaScript objects. The code sample demonstrates how to read a plist file asynchronously and parse its content.

const plist = require('plist');
const fs = require('fs');

fs.readFile('example.plist', 'utf8', function(err, data) {
  if (err) throw err;
  const parsedData = plist.parse(data);
  console.log(parsedData);
});

Building plist files

This feature allows you to create plist files from JavaScript objects. The code sample shows how to convert an object into plist format and then write it to a file.

const plist = require('plist');
const fs = require('fs');

const obj = {
  key1: 'value1',
  key2: 'value2'
};

const plistContent = plist.build(obj);

fs.writeFile('example.plist', plistContent, function(err) {
  if (err) throw err;
  console.log('Plist file has been saved!');
});

Other packages similar to plist

Keywords

FAQs

Package last updated on 10 Nov 2015

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