shinnn / modernizr-stream

Create a readable stream that emits Modernizr code

Home Page:https://modernizr.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

modernizr-stream

npm version Build Status codecov

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

Use npm.

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

About

Create a readable stream that emits Modernizr code

https://modernizr.com/

License:ISC License


Languages

Language:JavaScript 100.0%