summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/JSONStream/readme.markdown
diff options
context:
space:
mode:
authorKat Marchán <kzm@sykosomatic.org>2017-01-26 17:21:26 +0100
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2017-01-30 14:47:24 -0500
commitafb7c1bac87d943a9ca6422c7100e0e3fe291740 (patch)
tree1ce1f8214473a200de9de52989c1ec8aad8ddf89 /deps/npm/node_modules/JSONStream/readme.markdown
parent5de3cf099cd01c84d1809dab90c041b76aa58d8e (diff)
downloadandroid-node-v8-afb7c1bac87d943a9ca6422c7100e0e3fe291740.tar.gz
android-node-v8-afb7c1bac87d943a9ca6422c7100e0e3fe291740.tar.bz2
android-node-v8-afb7c1bac87d943a9ca6422c7100e0e3fe291740.zip
deps: upgrade npm to 4.1.2
PR-URL: https://github.com/nodejs/node/pull/11020 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/node_modules/JSONStream/readme.markdown')
-rw-r--r--deps/npm/node_modules/JSONStream/readme.markdown12
1 files changed, 12 insertions, 0 deletions
diff --git a/deps/npm/node_modules/JSONStream/readme.markdown b/deps/npm/node_modules/JSONStream/readme.markdown
index 4628902e03..7e94ddd7f4 100644
--- a/deps/npm/node_modules/JSONStream/readme.markdown
+++ b/deps/npm/node_modules/JSONStream/readme.markdown
@@ -104,6 +104,18 @@ stream.on('data', function(data) {
```
+You can also emit the path:
+
+``` js
+var stream = JSONStream.parse(['rows', true, 'doc', {emitPath: true}]) //rows, ANYTHING, doc, items in docs with keys
+
+stream.on('data', function(data) {
+ console.log('path:', data.path);
+ console.log('value:', data.value);
+});
+
+```
+
### recursive patterns (..)
`JSONStream.parse('docs..value')`