Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reduce-flatten

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reduce-flatten - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

dist/index.js

29

package.json
{
"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>
```
* * *
&copy; 2016-18 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).
&copy; 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc