Socket
Socket
Sign inDemoInstall

@types/plist

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/plist

TypeScript definitions for plist


Version published
Weekly downloads
241K
decreased by-18.43%
Maintainers
1
Weekly downloads
 
Created

What is @types/plist?

@types/plist provides TypeScript type definitions for the plist package, which is used to parse and build Apple Property List (plist) files. These files are commonly used in macOS and iOS applications for configuration and serialization of data.

What are @types/plist's main functionalities?

Parsing plist files

This feature allows you to parse a plist XML string into a JavaScript object. The code sample demonstrates how to parse a plist XML string containing a dictionary with keys 'name' and 'age'.

const plist = require('plist');
const xml = '<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n<plist version="1.0">\n<dict>\n    <key>name</key>\n    <string>John Doe</string>\n    <key>age</key>\n    <integer>30</integer>\n</dict>\n</plist>';
const obj = plist.parse(xml);
console.log(obj);

Building plist files

This feature allows you to build a plist XML string from a JavaScript object. The code sample demonstrates how to convert a JavaScript object with properties 'name' and 'age' into a plist XML string.

const plist = require('plist');
const obj = { name: 'John Doe', age: 30 };
const xml = plist.build(obj);
console.log(xml);

Other packages similar to @types/plist

FAQs

Package last updated on 07 Nov 2023

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