Socket
Socket
Sign inDemoInstall

@bemoje/arr-del-immutable

Package Overview
Dependencies
21
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @bemoje/arr-del-immutable

Immnutably remove an element from an array if it is present.


Version published
Weekly downloads
6
increased by500%
Maintainers
1
Install size
253 kB
Created
Weekly downloads
 

Readme

Source

@bemoje/arr-del-immutable

Immnutably remove an element from an array if it is present.

Version

NPM version

Travis CI

dependencies

Dependencies

dependencies

Stats

NPM downloads Forks

Donate

Buy Me A Beer donate button PayPal donate button

Installation

npm install @bemoje/arr-del-immutable
npm install --save @bemoje/arr-del-immutable
npm install --save-dev @bemoje/arr-del-immutable

Usage

import arrDelImmutable from '@bemoje/arr-del-immutable'

const arr = [1, 2]
const newArr = arrDelImmutable(arr, 1)

arr === newArr
//=> false

arr
//=> [1, 2]

newArr
//=> [2]

Tests

Uses Jest to test module functionality. Run tests to get coverage details.

npm run test

API

arrDelImmutable

Immnutably remove an element from an array if it is present.

Parameters
  • arr Array The array

  • element any The element to remove

Returns

Array A shallow clone of the passed array with the element removed

Keywords

FAQs

Last updated on 30 Apr 2020

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