From 996cafc32c7612ff39ca515142fa5edb46550b5e Mon Sep 17 00:00:00 2001 From: chee Date: Fri, 5 May 2017 03:01:36 +0100 Subject: [PATCH] add note about stringify to the readme --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0e6a367..15e894a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ -# NeXTStep plist parser +# NeXTStep plist parser and writer -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) +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` @@ -17,11 +18,15 @@ const plist = `{ "~f" = "moveWordForward:", "~b" = "moveWordBackward:" }` -const {parse} = require('nextstep-plist') -parse(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 `` syntax * support comments +* make the output prettier +* write tests for stringify +* tell @gnarf