New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@bakkerjoeri/array-without

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bakkerjoeri/array-without

Returns an array without given items.

latest
Source
npmnpm
Version
2.0.2
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

array-without

Exclude one or more items from an array.

Installation

npm install @bakkerjoeri/array-without

Usage

import arrayWithout from '@bakkerjoeri/array-without';

const groceries = ['apple', 'potato', 'pear', 'cucumber', 'orange'];
const noCucumber = arrayWithout(groceries, 'cucumber'); // => ['apple', 'potato', 'pear', 'orange']
const onlyFruits = arrayWithout(groceries, 'potato', 'cucumber'); // => ['apple', 'pear', 'orange']

The function returns a new array without mutating the initial array.

FAQs

Package last updated on 16 Apr 2020

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