ramda-adjunct icon indicating copy to clipboard operation
ramda-adjunct copied to clipboard

renameKey

Open char0n opened this issue 5 years ago • 6 comments

Is your feature request related to a problem? Please describe.

Renames single key of an object.

Describe the solution you'd like

const obj = {key: 1};
RA.renameKey('key', 'renamedKey', obj); //=> {renamedKey: 1}

Describe alternatives you've considered

RA.renameKeyWith

Additional context

This function should be implemented as specialization of R.renameKeys. Ramda cookbook contains reference to this function. After the implement edit cookbook and the reference there.

  • [ ] implement the function
  • [ ] add ref to ramda cookbook

char0n avatar Dec 24 '19 08:12 char0n

Might be helpful to look at #1228 and implement this as a specialisation of renameKeyWith instead.

dbartholomae avatar Oct 01 '20 10:10 dbartholomae

@dbartholomae yep, sounds good!

char0n avatar Oct 01 '20 18:10 char0n

Happy to grab this!

Maushundb avatar Jan 03 '21 20:01 Maushundb

@char0n that card still on queue to be developed?

tauantcamargo avatar Jul 15 '22 13:07 tauantcamargo

@tauantcamargo sure.

char0n avatar Sep 18 '22 14:09 char0n

Note: we already have renameKeyWith implemented in https://github.com/char0n/ramda-adjunct/issues/1228. As mentioned above, it would be best to implement renameKey as specialization of renameKeyWith (if possible).

char0n avatar Sep 18 '22 14:09 char0n