[Pkg-javascript-commits] [node-jsonstream] 115/214: document new features

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 1 12:58:47 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-jsonstream.

commit 44a763967ca270601cf57b02547c9c68a2b06f55
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Tue May 13 15:59:58 2014 +0200

    document new features
---
 readme.markdown | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/readme.markdown b/readme.markdown
index cf5987c..ffc743a 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -114,6 +114,14 @@ levels, emitting 0, 1, 2, 3 and 4 as results.
 }
 ```
 
+## JSONStream.parse(pattern, map)
+
+provide a function that can be used to map or filter
+the json output. `map` is passed the value at that node of the pattern,
+if `map` return non-nullish (anything but `null` or `undefined`)
+that value will be emitted in the stream. If it returns a nullish value,
+nothing will be emitted.
+
 ## JSONStream.stringify(open, sep, close)
 
 Create a writable stream.
@@ -140,6 +148,14 @@ Accordingly, `open='{\n', sep='\n,\n', close='\n}\n'`.
 When you `.write()` to the stream you must supply an array with `[ key, data ]`
 as the first argument.
 
+## unix tool
+
+query npm to see all the modules that browserify has ever depended on.
+
+``` bash
+curl https://registry.npmjs.org/browserify | JSONStream 'versions.*.dependencies'
+```
+
 ## numbers
 
 There are occasional problems parsing and unparsing very precise numbers.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jsonstream.git



More information about the Pkg-javascript-commits mailing list