object-without-props

0.1.2 • Public • Published

objectWithoutProps + objectWithProps

A package for SHALLOW removing of properties from an object or selecting properties from an object and creating a new object out of the result.

Installation

yarn add object-without-props or npm i object-without-props

Usage

import objectWithoutProps, {objectWithProps} from 'object-without-props'


const objectA = {foo: 'bar', bar: 'baz', baz: 'boz'}
const objectB = {foo: null}
const objectC = ['bar']

objectWithoutProps(objectA, objectB, objectC)
// {baz: 'boz'}

objectWithProps(objectA, objectB, objectC)
// {foo: 'bar', bar: 'baz'}

/object-without-props/

    Package Sidebar

    Install

    npm i object-without-props

    Weekly Downloads

    0

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    10.6 kB

    Total Files

    10

    Last publish

    Collaborators

    • jaredlunde