File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,12 @@ JSON Stringify as a Readable Stream with rescursive resolving of any readable st
3939npm install --save json-stream-stringify
4040
4141# Optional if you need polyfills
42- # Make sure to include these in your bundle or load the polyfilled version of this library
42+ # Make sure to include these if you target NodeJS <=v6 or browsers
4343npm install --save @babel/polyfill @babel/runtime
4444```
4545
4646## Usage
47- Using Node v6+ with ESM / Webpack / Browserify / Rollup
47+ Using Node v8 or later with ESM / Webpack / Browserify / Rollup
4848``` javascript
4949// No Polyfills
5050import JsonStreamStringify from ' JsonStreamStringify' ;
@@ -54,12 +54,12 @@ import JsonStreamStringify from 'JsonStreamStringify';
5454import JsonStreamStringify from ' JsonStreamStringify/module.polyfill' ;
5555```
5656
57- Using Node v6 or later / Other ES2015 environments
57+ Using Node >=8 / Other ES2015 environments
5858``` javascript
5959const JsonStreamStringify = require (' JsonStreamStringify' );
6060```
6161
62- Using Node v4 or earlier / Other ES5 environments
62+ Using Node <=6 / Other ES5 environments
6363``` javascript
6464var JsonStreamStringify = require (' JsonStreamStringify/umd.polyfill' );
6565```
Original file line number Diff line number Diff line change 11/* eslint-disable import/no-dynamic-require */
22
3- const prop = process . version . split ( '.' ) [ 0 ] . slice ( 1 ) >= 6 ? '' : '.polyfill' ;
3+ const prop = process . version . split ( '.' ) [ 0 ] . slice ( 1 ) >= 8 ? '' : '.polyfill' ;
44module . exports = require ( `./dist/umd${ prop } .js` ) ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export default [
55 {
66 input : './src/JsonStreamStringify.js' ,
77 output : [ {
8- file : './dist/umd.polyfilled .js' ,
8+ file : './dist/umd.polyfill .js' ,
99 format : 'umd' ,
1010 name : 'jsonStreamStringify' ,
1111 sourcemap : true ,
You can’t perform that action at this time.
0 commit comments