{"library":"plist","title":"plist","description":"The `plist` library provides robust facilities for parsing and building Apple Property List (Plist) files in both Node.js and browser environments. Plists are XML-based or binary structured data files commonly used in macOS and iOS applications, akin to JSON for configuration and data storage. The current stable version is 3.1.0, and it maintains an active development status with releases primarily driven by bug fixes, dependency updates, or feature enhancements. Key differentiators include its cross-platform compatibility, support for both XML and binary plist formats (implied by typical plist library functionality, though README focuses on XML), and its straightforward API for converting between JavaScript objects and plist XML strings. This package is an essential tool for developers working with Apple-specific file formats outside of the Apple ecosystem, providing programmatic access to data found in `.plist` files, such as `Info.plist` or iTunes configuration files.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install plist"],"cli":null},"imports":["const plist = require('plist');","import plist from 'plist';","import plist from 'plist'; const parsed = plist.parse(xml); const built = plist.build(obj);"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import plist from 'plist';\n\nconst xmlString = `<?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  <key>metadata</key>\n  <dict>\n    <key>bundle-identifier</key>\n    <string>com.company.app</string>\n    <key>bundle-version</key>\n    <string>0.1.1</string>\n    <key>kind</key>\n    <string>software</string>\n    <key>title</key>\n    <string>AppName</string>\n  </dict>\n</plist>`;\n\n// Parse the XML string into a JavaScript object\nconst parsedObject = plist.parse(xmlString);\nconsole.log('Parsed Object:', parsedObject);\n\n// Build a new plist XML string from a JavaScript object\nconst dataToBuild = [\n  'metadata',\n  {\n    'bundle-identifier': 'com.company.newapp',\n    'bundle-version': '1.0.0',\n    'kind': 'software',\n    'title': 'New App Name'\n  }\n];\nconst builtXml = plist.build(dataToBuild);\nconsole.log('Built XML:\\n', builtXml);","lang":"javascript","description":"Demonstrates parsing a plist XML string into a JavaScript object and then building a plist XML string from a JavaScript object using the library's main `parse` and `build` functions.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}