@bakkerjoeri/object-without

Omit one or more properties from an object.

Usage no npm install needed!

<script type="module">
  import bakkerjoeriObjectWithout from 'https://cdn.skypack.dev/@bakkerjoeri/object-without';
</script>

README

object-without

Omit one or more properties from an object.

Installation

npm install @bakkerjoeri/object-without

Usage

import objectWithout from '@bakkerjoeri/object-without';

const users = {
    1: 'kate',
    2: 'derrek',
};

const kickDerrek = objectWithout(users, 2);

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