Skip to main content
Module

x/rambda/source/dissoc.js

Faster and smaller alternative to Ramda
Go to Latest
File
export function dissoc(prop, obj) { if (arguments.length === 1) return _obj => dissoc(prop, _obj)
if (obj === null || obj === undefined) return {}
const willReturn = {} for (const p in obj) { willReturn[p] = obj[p] } delete willReturn[prop]
return willReturn}