selfrefactor/rambda

Missing ramda's `dissoc` function

sujameslin opened this issue · 2 comments

Self explanatory with title

Give me 2 days and it will be completed.

It is added in the new version.

Note that because Rambda.omit uses also string notation, you can use most of the time this method instead of dissoc. The only difference is that dissoc works with non-string types.

test('works with non-string property', () => {
  expect(R.dissoc(42, {a: 1, 42: 2})).toEqual({a: 1})
  expect(R.dissoc(null, {a: 1, 'null': 2})).toEqual({a: 1})
  expect(R.dissoc(undefined, {a: 1, 'undefined': 2})).toEqual({a: 1})
})

In other cases both methods are equal:

R.omit('a', {a: 1, b:2 })
// is same as
R.dissoc('a', {a: 1, b:2 })