Sha256: d19fa60447b99d7e0abde13a01ae63b112626b1c4468642e91f0344cdb7423d2
Contents?: true
Size: 553 Bytes
Versions: 10
Compression:
Stored size: 553 Bytes
Contents
var JSONStream = require('../') var data = [ {ID: 1, optional: null}, {ID: 2, optional: null}, {ID: 3, optional: 20}, {ID: 4, optional: null}, {ID: 5, optional: 'hello'}, {ID: 6, optional: null} ] var test = require('tape') test ('null properties', function (t) { var actual = [] var stream = JSONStream.parse('*.optional') .on('data', function (v) { actual.push(v) }) .on('end', function () { t.deepEqual(actual, [20, 'hello']) t.end() }) stream.write(JSON.stringify(data, null, 2)) stream.end() })
Version data entries
10 entries across 9 versions & 3 rubygems