Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 745 Bytes

README.md

File metadata and controls

27 lines (21 loc) · 745 Bytes

NeXTStep plist parser

parse 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} = require('nextstep-plist')
parse(plist) // {'~f': 'moveWordForward:', '~b': 'moveWordBackward:'}

todo

  • clean up this code
  • support <binary> syntax
  • support comments