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

array-tools

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-tools - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

4

package.json
{
"name": "array-tools",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "1.4.0",
"version": "1.4.1",
"description": "Useful functions for working with arrays",

@@ -24,3 +24,3 @@ "repository": "https://github.com/75lb/array-tools.git",

"lint": "jshint lib/*.js test/*.js; echo",
"docs": "jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo",
"docs": "jsdoc2md -t jsdoc2md/README.hbs --example-code-gfm js --heading-depth 1 --github lib/*.js > README.md; echo",
"watch": "baldrick --do 'npm run docs' --when lib/*.js --change"

@@ -27,0 +27,0 @@ },

@@ -28,3 +28,3 @@ [![view on npm](http://img.shields.io/npm/v/array-tools.svg)](https://www.npmjs.org/package/array-tools)

* [.extract(array, query)](#module_array-tools.extract) ⇒ <code>Array</code>
* [.flatten()](#module_array-tools.flatten)
* [.flatten()](#module_array-tools.flatten) ⇒ <code>Array</code>

@@ -38,3 +38,3 @@ <a name="module_array-tools.without"></a>

| input | <code>Array</code> | the input array |
| toRemove | <code>*</code> | a single, or array of values to omit |
| toRemove | <code>\*</code> | a single, or array of values to omit |

@@ -82,3 +82,3 @@ **Example**

| ----- | ---- | ----------- |
| input | <code>*</code> | the input value to convert to an array |
| input | <code>\*</code> | the input value to convert to an array |

@@ -105,3 +105,3 @@ **Example**

| array | <code>Array</code> | the array to search |
| value | <code>*</code> | the value to search for |
| value | <code>\*</code> | the value to search for |

@@ -248,3 +248,3 @@ **Example**

| test | <code>RegExp</code> | the test to continue splicing while true |
| ...elementN | <code>*</code> | the elements to add to the array |
| ...elementN | <code>\*</code> | the elements to add to the array |

@@ -271,4 +271,4 @@ **Example**

<a name="module_array-tools.flatten"></a>
##a.flatten()
flatten
##a.flatten() ⇒ <code>Array</code>
flatten an array of arrays into a single array

@@ -280,4 +280,14 @@ **Since**: 1.4.0

**Example**
```js
> numbers = [ 1, 2, [ 3, 4 ], 5 ]
[ 1,
2,
[ 3, 4 ],
5 ]
> a.flatten(numbers)
[ 1, 2, 3, 4, 5 ]
```
*documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown)*.
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