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

elude

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elude

Elude values from a collection with a powerfull include / exclude config.

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

elude

Elude values from a collection with a powerfull include / exclude config.

npm version Build Status Coverage Status dependencies Status


Install

npm install --save elude
const elude = require('elude');

Usage

const beatles = [
  { name: 'John', alive: false, age: 40 },
  { name: 'Paul', alive: true, age: 74 },
  { name: 'George', alive: false, age: 57 },
  { name: 'Ringo', alive: true, age: 76 },
];

const alive = elude(beatles, { include: 'alive' }); // Paul, Ringo

const favorites = elude(beatles, { exclude: { name: /^[GR]/ } }); // John, Paul

const shouldRetire = elude(beatles, {
  include: (member) => member.age > 60,
  exclude: { name: 'Paul' },
}); // Ringo

Matchr

Elude uses matchr for its powerfull value matching. Be sure to check all its options.

API

elude( collection:Array<\*> [, options:object ])

  • options.include: * | Array<*>
  • options.exclude: * | Array<*>

elude.one( value:\* [, options:object ])

  • options.include: * | Array<*>
  • options.exclude: * | Array<*>

Keywords

FAQs

Package last updated on 19 May 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc