@dewib/dw-api
Advanced tools
Comparing version 2.6.1 to 2.6.2
@@ -5,2 +5,4 @@ # Changelog | ||
### [2.6.2](https://github.com/gaetansenn/dw-api/compare/v2.6.1...v2.6.2) (2022-04-20) | ||
### [2.6.1](https://github.com/gaetansenn/dw-api/compare/v2.6.0...v2.6.1) (2022-04-20) | ||
@@ -7,0 +9,0 @@ |
@@ -134,5 +134,5 @@ import { isObject, camelCase, isEmpty, isString, get } from 'lodash' | ||
fields.forEach((field) => { | ||
// We normalize to camelCase if format | ||
const _camelCase = format ? camelCase : data => data | ||
const normalizedKey = _camelCase(isObject(field) ? field.newKey || field.key : field) | ||
const key = isObject(field) ? field.newKey || field.key : field | ||
// We normalize to camelCase if format is true | ||
const normalizedKey = format ? camelCase(key) : key | ||
@@ -139,0 +139,0 @@ if (typeof field.fields === 'function') field.fields = field.fields() |
{ | ||
"name": "@dewib/dw-api", | ||
"version": "2.6.1", | ||
"version": "2.6.2", | ||
"description": "Wrap all your request into one place and map your response for your needs", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
13913