diff options
Diffstat (limited to 'deps/npm/node_modules/JSONStream')
20 files changed, 47 insertions, 40 deletions
diff --git a/deps/npm/node_modules/JSONStream/.travis.yml b/deps/npm/node_modules/JSONStream/.travis.yml index 2f60c363d2..5f30bb5bd1 100644 --- a/deps/npm/node_modules/JSONStream/.travis.yml +++ b/deps/npm/node_modules/JSONStream/.travis.yml @@ -4,3 +4,5 @@ node_js: - 5 - 6 sudo: false + + diff --git a/deps/npm/node_modules/JSONStream/LICENSE.MIT b/deps/npm/node_modules/JSONStream/LICENSE.MIT index 49e7da41fe..6eafbd734a 100644 --- a/deps/npm/node_modules/JSONStream/LICENSE.MIT +++ b/deps/npm/node_modules/JSONStream/LICENSE.MIT @@ -2,23 +2,23 @@ The MIT License Copyright (c) 2011 Dominic Tarr -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/JSONStream/bin.js b/deps/npm/node_modules/JSONStream/bin.js index 32209630f2..af2b6ac6c6 100755 --- a/deps/npm/node_modules/JSONStream/bin.js +++ b/deps/npm/node_modules/JSONStream/bin.js @@ -8,3 +8,5 @@ if(!module.parent && process.title !== 'browser') { .pipe(JSONStream.stringify('[', ',\n', ']\n', 2)) .pipe(process.stdout) } + + diff --git a/deps/npm/node_modules/JSONStream/examples/all_docs.js b/deps/npm/node_modules/JSONStream/examples/all_docs.js index f20781e18c..fa87fe52da 100644 --- a/deps/npm/node_modules/JSONStream/examples/all_docs.js +++ b/deps/npm/node_modules/JSONStream/examples/all_docs.js @@ -6,7 +6,7 @@ var parser = JSONStream.parse(['rows', true]) //emit parts that match this path , 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) - return data + return data }) req.pipe(parser) diff --git a/deps/npm/node_modules/JSONStream/index.js b/deps/npm/node_modules/JSONStream/index.js index 8c587af769..f4ed901f96 100755 --- a/deps/npm/node_modules/JSONStream/index.js +++ b/deps/npm/node_modules/JSONStream/index.js @@ -244,3 +244,4 @@ exports.stringifyObject = function (op, sep, cl, indent) { return stream } + diff --git a/deps/npm/node_modules/JSONStream/readme.markdown b/deps/npm/node_modules/JSONStream/readme.markdown index 7e94ddd7f4..422c3df2cc 100644 --- a/deps/npm/node_modules/JSONStream/readme.markdown +++ b/deps/npm/node_modules/JSONStream/readme.markdown @@ -118,9 +118,9 @@ stream.on('data', function(data) { ### recursive patterns (..) -`JSONStream.parse('docs..value')` +`JSONStream.parse('docs..value')` (or `JSONStream.parse(['docs', {recurse: true}, 'value'])` using an array) -will emit every `value` object that is a child, grand-child, etc. of the +will emit every `value` object that is a child, grand-child, etc. of the `docs` object. In this example, it will match exactly 5 times at various depth levels, emitting 0, 1, 2, 3 and 4 as results. @@ -204,3 +204,4 @@ https://github.com/Floby/node-json-streams ## license Dual-licensed under the MIT License or the Apache License, version 2.0 + diff --git a/deps/npm/node_modules/JSONStream/test/bool.js b/deps/npm/node_modules/JSONStream/test/bool.js index 9b87b1730f..6c386d609f 100644 --- a/deps/npm/node_modules/JSONStream/test/bool.js +++ b/deps/npm/node_modules/JSONStream/test/bool.js @@ -13,7 +13,7 @@ var fs = require ('fs') lies: true, nothing: [null], // stuff: [Math.random(),Math.random(),Math.random()] - } + } : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] ) } @@ -25,7 +25,7 @@ var expected = [] , called = 0 , count = 10 , ended = false - + while (count --) expected.push(randomObj()) @@ -34,7 +34,7 @@ while (count --) stringify, JSONStream.parse([true]), es.writeArray(function (err, lines) { - + it(lines).has(expected) console.error('PASSED') }) diff --git a/deps/npm/node_modules/JSONStream/test/doubledot1.js b/deps/npm/node_modules/JSONStream/test/doubledot1.js index ceaa3edb33..78149b93f6 100644 --- a/deps/npm/node_modules/JSONStream/test/doubledot1.js +++ b/deps/npm/node_modules/JSONStream/test/doubledot1.js @@ -11,7 +11,7 @@ var expected = JSON.parse(fs.readFileSync(file)) , parsed = [] fs.createReadStream(file).pipe(parser) - + parser.on('data', function (data) { called ++ parsed.push(data) diff --git a/deps/npm/node_modules/JSONStream/test/doubledot2.js b/deps/npm/node_modules/JSONStream/test/doubledot2.js index 980024153c..b0bc5b1670 100644 --- a/deps/npm/node_modules/JSONStream/test/doubledot2.js +++ b/deps/npm/node_modules/JSONStream/test/doubledot2.js @@ -11,7 +11,7 @@ , parsed = [] fs.createReadStream(file).pipe(parser) - + parser.on('data', function (data) { called ++ parsed.push(data) diff --git a/deps/npm/node_modules/JSONStream/test/fn.js b/deps/npm/node_modules/JSONStream/test/fn.js index 01e61e88fa..4acc672627 100644 --- a/deps/npm/node_modules/JSONStream/test/fn.js +++ b/deps/npm/node_modules/JSONStream/test/fn.js @@ -17,7 +17,7 @@ var expected = JSON.parse(fs.readFileSync(file)) , parsed = [] fs.createReadStream(file).pipe(parser) - + parser.on('data', function (data) { called ++ it.has({ diff --git a/deps/npm/node_modules/JSONStream/test/gen.js b/deps/npm/node_modules/JSONStream/test/gen.js index 75e87d56e4..c233722ac3 100644 --- a/deps/npm/node_modules/JSONStream/test/gen.js +++ b/deps/npm/node_modules/JSONStream/test/gen.js @@ -111,7 +111,7 @@ var tape = require('tape') items++ if(Math.random() < 0.01) console.log(items, '...') }); - + parser.on('end', function () { t.equal(items, size) }); @@ -126,10 +126,10 @@ var tape = require('tape') console.log(stat) if(err) generateTestData(testJSONStreamParse_causesOutOfMem); - else + else testJSONStreamParse_causesOutOfMem() }) }) - + // } diff --git a/deps/npm/node_modules/JSONStream/test/keys.js b/deps/npm/node_modules/JSONStream/test/keys.js index 86b65b257b..747723d11e 100644 --- a/deps/npm/node_modules/JSONStream/test/keys.js +++ b/deps/npm/node_modules/JSONStream/test/keys.js @@ -41,7 +41,7 @@ test('keys via array', function(t) { test('path via array', function(t) { var stream = JSONStream.parse(['obj',{emitPath: true}]); - + var paths = []; var values = []; stream.on('data', function(data) { diff --git a/deps/npm/node_modules/JSONStream/test/map.js b/deps/npm/node_modules/JSONStream/test/map.js index 6c05fc6840..29b9d89691 100644 --- a/deps/npm/node_modules/JSONStream/test/map.js +++ b/deps/npm/node_modules/JSONStream/test/map.js @@ -37,3 +37,4 @@ test('filter function', function (t) { stream.end() }) + diff --git a/deps/npm/node_modules/JSONStream/test/null.js b/deps/npm/node_modules/JSONStream/test/null.js index 25628ee585..95dd60c0af 100644 --- a/deps/npm/node_modules/JSONStream/test/null.js +++ b/deps/npm/node_modules/JSONStream/test/null.js @@ -14,7 +14,7 @@ var test = require('tape') test ('null properties', function (t) { var actual = [] - var stream = + var stream = JSONStream.parse('*.optional') .on('data', function (v) { actual.push(v) }) diff --git a/deps/npm/node_modules/JSONStream/test/parsejson.js b/deps/npm/node_modules/JSONStream/test/parsejson.js index df4fbbe73a..e70dabc184 100644 --- a/deps/npm/node_modules/JSONStream/test/parsejson.js +++ b/deps/npm/node_modules/JSONStream/test/parsejson.js @@ -7,7 +7,7 @@ var r = Math.random() , Parser = require('jsonparse') , p = new Parser() - , assert = require('assert') + , assert = require('assert') , times = 20 , bufferFrom = Buffer.from && Buffer.from !== Uint8Array.from , str diff --git a/deps/npm/node_modules/JSONStream/test/stringify.js b/deps/npm/node_modules/JSONStream/test/stringify.js index 20b9969575..b6de85ed25 100644 --- a/deps/npm/node_modules/JSONStream/test/stringify.js +++ b/deps/npm/node_modules/JSONStream/test/stringify.js @@ -13,7 +13,7 @@ var fs = require ('fs') lies: true, nothing: [null], stuff: [Math.random(),Math.random(),Math.random()] - } + } : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] ) } @@ -25,7 +25,7 @@ var expected = [] , called = 0 , count = 10 , ended = false - + while (count --) expected.push(randomObj()) @@ -34,7 +34,7 @@ while (count --) stringify, //JSONStream.parse([/./]), es.writeArray(function (err, lines) { - + it(JSON.parse(lines.join(''))).deepEqual(expected) console.error('PASSED') }) diff --git a/deps/npm/node_modules/JSONStream/test/stringify_object.js b/deps/npm/node_modules/JSONStream/test/stringify_object.js index 73a2b8350d..9490115a0d 100644 --- a/deps/npm/node_modules/JSONStream/test/stringify_object.js +++ b/deps/npm/node_modules/JSONStream/test/stringify_object.js @@ -16,7 +16,7 @@ var fs = require ('fs') lies: true, nothing: [null], stuff: [Math.random(),Math.random(),Math.random()] - } + } : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] ) } @@ -24,7 +24,7 @@ var fs = require ('fs') for (var ix = 0; ix < pending; ix++) (function (count) { var expected = {} , stringify = JSONStream.stringifyObject() - + es.connect( stringify, es.writeArray(function (err, lines) { diff --git a/deps/npm/node_modules/JSONStream/test/test.js b/deps/npm/node_modules/JSONStream/test/test.js index adc3d75695..8ea7c2e1f1 100644 --- a/deps/npm/node_modules/JSONStream/test/test.js +++ b/deps/npm/node_modules/JSONStream/test/test.js @@ -13,7 +13,7 @@ var expected = JSON.parse(fs.readFileSync(file)) , parsed = [] fs.createReadStream(file).pipe(parser) - + parser.on('data', function (data) { called ++ it.has({ diff --git a/deps/npm/node_modules/JSONStream/test/test2.js b/deps/npm/node_modules/JSONStream/test/test2.js index a77ca3910a..d09df7be4d 100644 --- a/deps/npm/node_modules/JSONStream/test/test2.js +++ b/deps/npm/node_modules/JSONStream/test/test2.js @@ -13,7 +13,7 @@ var expected = JSON.parse(fs.readFileSync(file)) , parsed = [] fs.createReadStream(file).pipe(parser) - + parser.on('data', function (data) { called ++ it(data).deepEqual(expected) diff --git a/deps/npm/node_modules/JSONStream/test/two-ways.js b/deps/npm/node_modules/JSONStream/test/two-ways.js index a74dfba36e..8f3b89c8bf 100644 --- a/deps/npm/node_modules/JSONStream/test/two-ways.js +++ b/deps/npm/node_modules/JSONStream/test/two-ways.js @@ -13,7 +13,7 @@ var fs = require ('fs') lies: true, nothing: [null], // stuff: [Math.random(),Math.random(),Math.random()] - } + } : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] ) } @@ -25,7 +25,7 @@ var expected = [] , called = 0 , count = 10 , ended = false - + while (count --) expected.push(randomObj()) @@ -34,7 +34,7 @@ while (count --) stringify, JSONStream.parse([/./]), es.writeArray(function (err, lines) { - + it(lines).has(expected) console.error('PASSED') }) |