Skip to content

💾 Stringify and write a NeXTSTEP property list atomically

License

Notifications You must be signed in to change notification settings

delucis/write-nextstep-plist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

write-nextstep-plist Build Status Coverage Status

Stringify and write a NeXTSTEP property list atomically

Converts a Javascript object into a property list string in the NeXTSTEP “plain text” format and writes it to disk. Creates directories for you as needed.

N.B. The NeXTSTEP format is different from both the XML and JSON plist formats.

Install

$ npm install --save write-nextstep-plist

Usage

const WRITE_PLIST = require('write-nextstep-plist')

WRITE_PLIST('demo.plist', {demo: true}).then(() => {
	console.log('done')
})

API

writeNextstepPlist(filepath, data, [options])

Returns a Promise.

writeNextstepPlist.sync(filepath, data, [options])

const WRITE_PLIST = require('write-nextstep-plist')

WRITE_PLIST.sync('demo.plist', {demo: true})
console.log('done')

options

Type: Object

mode

Type: number
Default: 0o666

Mode used when writing the file.

See also

Acknowledgements

Stringifying is accomplished using Chee’s nextstep-plist module.

This module is modelled on Sindre Sorhus’s write-json-file.

License

This software is free to use, modify, and redistribute under a GNU General Public License.

About

💾 Stringify and write a NeXTSTEP property list atomically

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published