Skip to content

Commit

Permalink
Fixed case changed for arrays of strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ddmng committed Jun 20, 2018
1 parent ba34aca commit 21ab167
Show file tree
Hide file tree
Showing 5 changed files with 2,304 additions and 4 deletions.
Empty file added .vscode/temp.sql
Empty file.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ MIT

## Changelog
2.0.0 Object values are no longer being transformed by default

1.1.1 Stricter checking for code guideline

1.1.0 Add support for arrays and primitives

1.0.0 Initial version
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var changeKeys = function changeKeys(transformer, obj) {
if (Array.isArray(obj)) {
return obj.map(function keysMap(key) {
if (typeof key === 'string') {
return transformer(key);
return key;
}

return changeKeys(transformer, key);
Expand Down
Loading

0 comments on commit 21ab167

Please sign in to comment.