camelify-recursive
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -0,0 +0,0 @@ const log = console.log.bind(console) |
@@ -0,0 +0,0 @@ The MIT License (MIT) |
{ | ||
"name": "camelify-recursive", | ||
"version": "2.0.4", | ||
"description": "Recursively convert an object's keys to camelCase", | ||
"version": "2.0.5", | ||
"description": "Recursively convert an API response to camelCase", | ||
"main": "index.js", | ||
@@ -25,2 +25,6 @@ "scripts": { | ||
}, | ||
"repository": { | ||
"type" : "git", | ||
"url" : "https://github.com/mikemaccana/camelify-recursive" | ||
}, | ||
"prettier": { | ||
@@ -27,0 +31,0 @@ "semi": false, |
# Recursively convert API responses to camelCase | ||
Have an API response from someone that doesn't use JavaScript? | ||
Have an API response that doesn't use JavaScript-style casing? | ||
Want to be able to use the keys without having to fix the case all the time? | ||
Want to be able to use the data in the response without having to fix the case all the time? | ||
Let camelify do the work. | ||
It will **recursively** convert all the keys in the object to camelCase, so you can use those keys directly in your JavaScript (or JSON database) and not have to worry about converting things manually all the time. | ||
Cwmelify-recursive will **recursively** convert all the keys in the object to camelCase, so you can use those keys directly in your JavaScript (or JSON database) and not have to worry about converting things manually all the time. | ||
The word 'ID' will always be in uppercase as you'd expect with proper API results. | ||
The word `ID` will always be in uppercase as you'd expect. | ||
## Usage | ||
Just: | ||
```javascript | ||
const camelify = require('camelify-recursive') | ||
``` | ||
Then, to fix the object `someObject` | ||
```javascript | ||
someObject = camelify(someObject) | ||
``` | ||
## Before | ||
@@ -61,4 +47,16 @@ | ||
## Can I have emoji camels? | ||
## Usage | ||
🐫🐪🐫🐪🐫🐪🐫🐪🐫🐪 | ||
Just: | ||
```javascript | ||
const camelify = require('camelify-recursive') | ||
``` | ||
Then, to fix the object `someObject` | ||
```javascript | ||
someObject = camelify(someObject) | ||
``` | ||
@@ -0,0 +0,0 @@ const camelify = require('../index.js'), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
0
5506
62