reduce-flatten
Advanced tools
Comparing version 2.0.0 to 3.0.0
{ | ||
"name": "reduce-flatten", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "2.0.0", | ||
"description": "Flatten an array into the supplied array.", | ||
"repository": "https://github.com/75lb/reduce-flatten.git", | ||
"version": "3.0.0", | ||
"description": "Isomorphic map-reduce function to flatten an array into the supplied array", | ||
"repository": "https://github.com/75lb/reduce-flatten", | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"module": "index.mjs", | ||
"keywords": [ | ||
@@ -14,12 +16,23 @@ "array", | ||
"engines": { | ||
"node": ">=6" | ||
"node": ">=8" | ||
}, | ||
"scripts": { | ||
"test": "test-runner test.js", | ||
"docs": "jsdoc2md -t README.hbs index.js > README.md; echo" | ||
"test": "npm run dist && test-runner test.js", | ||
"docs": "jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md", | ||
"dist": "rollup -f umd -n flatten -o dist/index.js index.mjs" | ||
}, | ||
"devDependencies": { | ||
"jsdoc-to-markdown": "^4.0.1", | ||
"test-runner": "^0.5.0" | ||
"jsdoc-to-markdown": "^5.0.1", | ||
"rollup": "^1.22.0", | ||
"test-runner": "^0.6.0" | ||
}, | ||
"files": [ | ||
"index.mjs", | ||
"dist/index.js" | ||
], | ||
"standard": { | ||
"ignore": [ | ||
"dist" | ||
] | ||
} | ||
} |
[![view on npm](http://img.shields.io/npm/v/reduce-flatten.svg)](https://www.npmjs.org/package/reduce-flatten) | ||
[![npm module downloads](http://img.shields.io/npm/dt/reduce-flatten.svg)](https://www.npmjs.org/package/reduce-flatten) | ||
[![Build Status](https://travis-ci.org/75lb/reduce-flatten.svg?branch=master)](https://travis-ci.org/75lb/reduce-flatten) | ||
[![Dependency Status](https://david-dm.org/75lb/reduce-flatten.svg)](https://david-dm.org/75lb/reduce-flatten) | ||
[![Dependency Status](https://badgen.net/david/dep/75lb/reduce-flatten)](https://david-dm.org/75lb/reduce-flatten) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard) | ||
@@ -10,3 +10,3 @@ | ||
## reduce-flatten | ||
Flatten an array into the supplied array. | ||
Isomorphic map-reduce function to flatten an array into the supplied array. | ||
@@ -28,4 +28,32 @@ **Example** | ||
### Load anywhere | ||
This library is compatible with Node.js, the Web and any style of module loader. It can be loaded anywhere, natively without transpilation. | ||
Node.js: | ||
```js | ||
const arrayify = require('reduce-flatten') | ||
``` | ||
Within Node.js with ECMAScript Module support enabled: | ||
```js | ||
import arrayify from 'reduce-flatten' | ||
``` | ||
Within an modern browser ECMAScript Module: | ||
```js | ||
import arrayify from './node_modules/reduce-flatten/index.mjs' | ||
``` | ||
Old browser (adds `window.flatten`): | ||
```html | ||
<script nomodule src="./node_modules/reduce-flatten/dist/index.js"></script> | ||
``` | ||
* * * | ||
© 2016-18 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown). | ||
© 2016-19 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
6252
52
58
3
6