bplist-creator-pure
v0.2.3
Published
Binary Mac OS X Plist (property list) creator, no dependencies
Downloads
483
Readme
bplist-creator-pure
AI-assisted port of https://github.com/joeferner/node-bplist-creator
Binary Mac OS X Plist (property list) creator, without dependencies.
Installation
$ npm install bplist-creator-pureQuick Examples
import bplist from 'bplist-creator-pure';
var buffer = bplist({
key1: [1, 2, 3]
});Real/Double/Float handling
Javascript don't have different types for 1 and 1.0. This package
will automatically store numbers as the appropriate type, but can't
detect floats that is also integers.
If you need to force a value to be written with the real type pass
an instance of Real.
import bplist, { Real } from 'bplist-creator-pure';
var buffer = bplist({
backgroundRed: new Real(1),
backgroundGreen: new Real(0),
backgroundBlue: new Real(0)
});In xml the corresponding tags is <integer> and <real>.
