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

array.partial

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array.partial - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

4

index.js
'use strict'
module.exports = function(arr, func) {
const some = arr.filter(func)
module.exports = function (arr, func) {
var some = arr.filter(func)
return some.length !== 0 && some.length !== arr.length
}
{
"name": "array.partial",
"version": "1.0.4",
"version": "1.0.5",
"description":

@@ -5,0 +5,0 @@ "When you want array.some but not array.every. Useful when you need to determine partially selected states - like partially selecting tree nodes when some but not all child nodes are checked.",

@@ -32,3 +32,3 @@ # array.partial [![Build Status](https://travis-ci.org/mrchief/array.partial.svg?branch=master)](https://travis-ci.org/mrchief/array.partial)

const partial = require('array.partial')
partial(array, callback)
partial(array, predicate)
```

@@ -38,3 +38,3 @@

### partial(array, callback)
### partial(array, predicate)

@@ -47,5 +47,5 @@ Return true if and only if some elements pass the check, otherwise false.

#### callback
#### predicate
Type: `Function` - Function is a predicate, to test each element of the array. This is called with the following arguments:
Type: `Function` - A predicate, to test each element of the array. This is called with the following arguments:

@@ -52,0 +52,0 @@ `element` - The current element being processed in the array

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