Project

General

Profile

Actions

Feature #27642

closed

Add helpers for deep props keys transformations

Added by Ondřej Pražák over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
JavaScript stack
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

We currently have propsToSnakeCase and propsToCamelCase helpers to transform object keys, however these cannot handle nested objects. It would be useful if we had helpers that would transform keys for nested objects as well.

console.log(deepPropsToSnakeCase({ myTest: { notHere: 'foo' } }));
// { my_test: { not_here: 'foo' } } 
Actions

Also available in: Atom PDF