question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
char0ncommented, Sep 18, 2022

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).

1reaction
Maushundbcommented, Jan 3, 2021

Happy to grab this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lodash _.renameKeys() Method - GeeksforGeeks
renameKeys () method takes an object and a mapping object and returns a new object where the keys of the given object have...
Read more >
JavaScript: Object Rename Key - Stack Overflow
In case someone needs to rename a list of properties: function renameKeys(obj ...
Read more >
Rename object keys - 30 seconds of code
Replaces the names of multiple object keys with the values provided.
Read more >
renameKeys | 30 Seconds of Typescript - Deepak Vishwakarma
renameKeys. JS TODO. Replaces the names of multiple object keys with the values provided. Use Object.keys() in combination with Array.prototype.reduce() and ...
Read more >
rename-keys - npm
Modify the names of the own enumerable properties (keys) of an object.. Latest version: 2.0.1, last published: 5 years ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found