[Pkg-javascript-commits] [node-jsonstream] 39/214: replace "/./" with "true" in the examples

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 1 12:58:36 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 2d89c2b157647069f7919602c0b2dcf900594d6b
Author: James Halliday <mail at substack.net>
Date:   Thu Jun 14 04:06:24 2012 -0700

    replace "/./" with "true" in the examples
---
 examples/all_docs.js | 2 +-
 readme.markdown      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/all_docs.js b/examples/all_docs.js
index 565039a..fa87fe5 100644
--- a/examples/all_docs.js
+++ b/examples/all_docs.js
@@ -2,7 +2,7 @@ var request = require('request')
   , JSONStream = require('JSONStream')
   , es = require('event-stream')
 
-var parser = JSONStream.parse(['rows', /./]) //emit parts that match this path (any element of the rows array)
+var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array)
   , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'})
   , logger = es.mapSync(function (data) {  //create a stream that logs to stderr,
     console.error(data)
diff --git a/readme.markdown b/readme.markdown
index 319387d..3d9c9bb 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -10,7 +10,7 @@ var request = require('request')
   , JSONStream = require('JSONStream')
   , es = require('event-stream')
 
-var parser = JSONStream.parse(['rows', /./])
+var parser = JSONStream.parse(['rows', true])
   , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'})
   , logger = es.mapSync(function (data) {
       console.error(data)
@@ -82,7 +82,7 @@ we are probably most interested in the `rows.*.docs`
 create a `Stream` that parses the documents from the feed like this:
 
 ``` js
-JSONStream.parse(['rows', /./, 'doc']) //rows, ANYTHING, doc
+JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc
 ``` 
 awesome!
 

-- 
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