plist
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
@xmldom/xmldom | 0.8.10 | 50.64 kB | MIT | prod | |
base64-js | 1.5.1 | 4.01 kB | MIT | prod | |
xmlbuilder | 15.1.1 | 61.4 kB | MIT | prod |
The plist
is a Node.js and browser package that functions as a parser and builder for Apple's property list (.plist) files. These files are frequently utilized in the development of OS X and iOS applications, as well as in the configuration of iTunes XML files. Essentially, plist files are a form of stored programming "object," bearing a significant similarity to JSON. A valid Plist file can be represented as a native JavaScript Object, and vice-versa, enabling easy manipulation and application in programming contexts.
The plist
package is designed to be user-friendly and is easy to use in both Node.js and browser environments. In a Node.js setting, the package can be installed via npm using the command npm install --save plist
. The plist
module can then be invoked using require('plist')
in your file. Following this, the parse()
and build()
functions can be utilized as required.
An example of usage in Node.js:
var plist = require('plist');
// now use the `parse()` and `build()` functions
var val = plist.parse('<plist><string>Hello World!</string></plist>');
console.log(val); // "Hello World!"
In a browser environment, the dist/plist.js
should be included in a <script>
tag in the HTML file. The parse()
and build()
functions can subsequently be used in the script.
An example of usage in a browser:
<script src="plist.js"></script>
<script>
// now use the `parse()` and `build()` functions
var val = plist.parse('<plist><string>Hello World!</string></plist>');
console.log(val); // "Hello World!"
</script>
The documentation for the plist
package is embedded within the information provided in the readme file on the package's GitHub page (https://github.com/TooTallNate/node-plist.git). Here, you'll find the details on how to install and use the package, examples of usage, and additional insights on how to perform specific tasks, such as parsing a plist from filename or string payload, and building plist DTD-compliant XML documents using JavaScript Objects.