NeXTSTEP plist parser

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


  1. const plist = `{
  2. "~f" = "moveWordForward:",
  3. "~b" = "moveWordBackward:"
  4. }`
  5. const {parse, stringify} = require('nextstep-plist')
  6. const js = parse(plist) // {'~f': 'moveWordForward:', '~b': 'moveWordBackward:'}
  7. stringify(js) // '{ "~f" = "moveWordForward:"; "~b": "moveWordBackward":}'