dissoc-path

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
1 KB
Makes a shallow clone of an object, omitting the property at the given path.
1 contributor
Install dissoc-path as a package?
Copied
npm i @bit/justin-capalbo.ramda.dissoc-path
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
dissocPath (
path:Array,
obj:Object
) : Object

Makes a shallow clone of an object, omitting the property at the given path. Note that this copies and flattens prototype properties onto the new object as well. All non-primitive properties are copied by reference.

Example
R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}}
Arguments
path: Array

The path to the value to omit

obj: Object

The object to clone

Returns
Object

A new object without the property at path

Help and resources