preact-material-components
Version:
preact wrapper for "Material Components for the web"
25 lines (20 loc) • 460 B
JavaScript
;
var objectAssign = require('object-assign');
var Transform = require('readable-stream/transform');
module.exports = function (opts) {
opts = opts || {};
return new Transform({
objectMode: true,
transform: function (file, enc, cb) {
if (file.isNull()) {
cb(null, file);
return;
}
if (file.isStream()) {
cb(new Error('Streaming is not supported'));
return;
}
cb(null, objectAssign(file, opts));
}
});
};