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

simple-plist

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-plist

A wrapper utility for interacting with plist data.

  • 0.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5M
increased by3.1%
Maintainers
2
Weekly downloads
 
Created

What is simple-plist?

The simple-plist npm package allows for the reading, writing, and manipulation of plist (Property List) files, which are commonly used in macOS and iOS for storing serialized objects. It provides a straightforward API for handling plist data in XML and binary formats.

What are simple-plist's main functionalities?

Reading plist files

This feature allows for the synchronous reading of plist files from the filesystem. The `readFileSync` method reads the file from the given path and returns the plist data as a JavaScript object.

const plist = require('simple-plist');
const data = plist.readFileSync('/path/to/file.plist');

Writing plist files

This feature enables the synchronous writing of plist data to files. The `writeFileSync` method takes a file path and a JavaScript object, then serializes the object into plist format and writes it to the specified file.

const plist = require('simple-plist');
const data = { key: 'value' };
plist.writeFileSync('/path/to/file.plist', data);

Parsing plist data

This feature involves parsing plist data from a string. The `parse` method takes a plist-formatted string and converts it into a JavaScript object, allowing for easy manipulation and access to the data.

const plist = require('simple-plist');
const plistData = '<plist><dict><key>exampleKey</key><string>exampleValue</string></dict></plist>';
const data = plist.parse(plistData);

Other packages similar to simple-plist

Keywords

FAQs

Package last updated on 11 May 2016

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