pull-json-parse
Advanced tools
Comparing version 0.0.1 to 0.0.2
'use strict'; | ||
const COMMA = 0x2c; | ||
const BRACKET_START = 0x5b; | ||
const BRACKET_END = 0x5d; | ||
var COMMA = 0x2c; | ||
var BRACKET_START = 0x5b; | ||
var BRACKET_END = 0x5d; | ||
@@ -42,2 +42,5 @@ module.exports = parse; | ||
if (typeof data !== 'string') | ||
data = data.toString(); | ||
while ((ni = data.indexOf('\n', pos)) !== -1) { | ||
@@ -44,0 +47,0 @@ tail = data.slice(pos, data.charCodeAt(ni - 1) === COMMA |
{ | ||
"name": "pull-json-parse", | ||
"description": "Parse a pull-stream with newline delimited JSON", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"repository": "srcagency/pull-json-parse", | ||
@@ -6,0 +6,0 @@ "scripts": { |
12
test.js
@@ -39,1 +39,13 @@ 'use strict'; | ||
}); | ||
test(function( t ){ | ||
t.plan(1); | ||
pull( | ||
pull.values([ new Buffer(JSON.stringify('Hidden string'), 'utf8') ]), | ||
parse, | ||
pull.collect(function( err, result ){ | ||
t.deepEqual(result, [ 'Hidden string' ]); | ||
}) | ||
); | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5466
129