nextstep-plist

0.4.3 • Public • Published

NeXTStep plist parser and writer

parse and generate NeXTStep style plists in node. these are not the xml style, but the older NeXTStep style (a similar filetype is used in GNUStep, with extensions)

the only place i know of to still use them in macOS is ~/Library/KeyBindings/DefaultKeyBinding.dict

the code is a messy state machine based on douglas crockford's json_parse_state

thanks everybody

using

const plist = `{
  "~f" = "moveWordForward:",
  "~b" = "moveWordBackward:"
}`
const {parse, stringify} = require('nextstep-plist')
const js = parse(plist) // {'~f': 'moveWordForward:', '~b': 'moveWordBackward:'}
stringify(js) // '{ "~f" = "moveWordForward:"; "~b": "moveWordBackward":}'

todo

  • clean up this code
  • support <binary> syntax
  • support comments
  • make the output prettier
  • write tests for stringify
  • tell @gnarf

Readme

Keywords

none

Package Sidebar

Install

npm i nextstep-plist

Weekly Downloads

6

Version

0.4.3

License

GPL-3.0

Unpacked Size

44.7 kB

Total Files

9

Last publish

Collaborators

  • chee