modernizr-stream
v3.0.0
Published
Create a readable stream that emits Modernizr code
Downloads
15
Maintainers
Readme
modernizr-stream
Create a readable stream that emits Modernizr code
const modernizrStream = require('modernizr-stream');
modernizrStream().pipe(process.stdout);
/*!
* modernizr v3.6.0
* Build https://modernizr.com/download?--dontmin
...
*/
Installation
npm install modernizr-stream
API
const modernizrStream = require('modernizr-stream');
modernizrStream([options])
options: Object
Return: stream.Readable
It returns a readable stream that emits JavaScript code built with the Modernizr code generator.
Options
All options of modernizr.build
and stream.Readable
are available.
modernizrStream().on('data', data => {
data.length; //=> 5497
});
modernizrStream({minify: true}).on('data', data => {
data.length; //=> 1165
});
License
ISC License © 2018 - 2019 Shinnosuke Watanabe