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

arr-u-legit

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

arr-u-legit

Strict compare an unsure array against a set of valid values to check if it's legit

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

arr-u-legit Build Status Coverage Status

🤔 Strict compare an unsure array against a set of valid values to check if it's legit

Install

$ npm install --save arr-u-legit

Usage

const legit = require('arr-u-legit');

legit(['apple', 'banana'], ['apple', 'banana', 'orange']); // => true
legit(['apple', 'banana', 'pineapple'], ['apple', 'banana', 'orange']); // => false

// Show Invalid Items
legit(['apple', 'banana', 'chicken'], ['apple', 'banana', 'orange'], true); // => ['chicken']

API

legit(unsureArray, validOptions [, showItems])

unsureArray

Type: array

The unsure array in question.

validOptions

Type: array

A set of valid options to compare against.

showItems

Type: bool
Default: false

A boolean flag to return the invalid items instead of a boolean result

License

MIT © Brandon Him

Keywords

FAQs

Package last updated on 07 Jul 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