/
eapostnova
/
2026-1--study--simulation-modeling
Обзор
Документация
Войти
/
eapostnova
/
2026-1--study--simulation-modeling
Код
Запросы
1
Задачи
Вики
Пакеты
0
Релизы
3
CI/CD
Аналитика
Безопасность
master
node_modules/JSONStream/test/null.js
28 строк
553 B
Елизавета Постнова
chore(site): add changelog
06 мар 2026, 00:34
Верифицирован
06 мар 2026, 00:34
8cca814
Код
Авторство
О чём код?
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() })