pull-freezed
v1.0.2
Published
though pull stream to recursively apply Object.freeze
Downloads
6
Readme
pull-freezed
pull stream that applies Object.freeze() recursively
install
npm install pull-freezed
example
var pull = require('pull-stream');
var freeze = require('pull-freezed');
pull(
pull.values( [ { a: 'immutable' } ] ),
freeze,
pull.map(function (data) {
data.a = 'something';
return data;
}),
pull.collect(function (err, result) {
if (!err) console.log(result); // a === 'immutable'
})
);