Socket
Socket
Sign inDemoInstall

object-some

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    object-some

`Array.prototype.some` for objects


Version published
Weekly downloads
4
decreased by-80%
Maintainers
1
Install size
4.07 kB
Created
Weekly downloads
 

Readme

Source

object-some

Build Status

Array.prototype.filter for objects.

Installation

npm install object-some

Usage

var assert = require('assert');
var objectSome = require('object-some');

var o1 = {
  a: 1,
  b: -1,
  c: 0,
  d: 42
};

objectSome(o1, function (n) {
  return n > 0;
}); // => `true`

objectSome(o1, function (n) {
  return n === 100'
}); // => `false`

API

objectSome(obj, iterator, this)

  • obj (object) - object to filter on
  • iterator (function, required) - iterator function
  • this (optional) - this for iterator

Iterates over obj, calls iterator(value, key, obj) with each item and returns true if it returns true when iterator returns true, false otherwise.

Keywords

FAQs

Last updated on 29 Nov 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc