Skip to content

Commit 8882c6e

Browse files
committed
Update readme, fix index.js
1 parent fa24e33 commit 8882c6e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ JSON Stringify as a Readable Stream with rescursive resolving of any readable st
3939
npm 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
4343
npm 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
5050
import JsonStreamStringify from 'JsonStreamStringify';
@@ -54,12 +54,12 @@ import JsonStreamStringify from 'JsonStreamStringify';
5454
import 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
5959
const JsonStreamStringify = require('JsonStreamStringify');
6060
```
6161

62-
Using Node v4 or earlier / Other ES5 environments
62+
Using Node <=6 / Other ES5 environments
6363
```javascript
6464
var JsonStreamStringify = require('JsonStreamStringify/umd.polyfill');
6565
```

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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';
44
module.exports = require(`./dist/umd${prop}.js`);

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)