1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-13 16:45:05 +01:00

Reduce dependency footprint of new includes

Opted for decamelize instead of snake-case as it’s much smaller and we
don’t need the extra functionality of snake-case.
This commit is contained in:
Brett Sun 2015-11-02 18:29:06 +01:00
parent fe4e337690
commit 955e20d6b6
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
'use strict'
import camelCase from 'camelcase';
import snakeCase from 'snake-case';
import decamelize from 'decamelize';
import qs from 'qs';
import { sanitize } from './general_utils';
@ -33,7 +33,7 @@ export function argsToQueryParams(obj) {
Object
.keys(sanitizedObj)
.forEach((key) => {
queryParamObj[snakeCase(key)] = sanitizedObj[key];
queryParamObj[decamelize(key)] = sanitizedObj[key];
});
// Use bracket arrayFormat as history.js and react-router use it

View File

@ -49,6 +49,7 @@
"camelcase": "^1.2.1",
"classnames": "^1.2.2",
"compression": "^1.4.4",
"decamelize": "^1.1.1",
"envify": "^3.4.0",
"eslint": "^0.22.1",
"eslint-plugin-react": "^2.5.0",
@ -74,7 +75,7 @@
"object-assign": "^2.0.0",
"opn": "^3.0.2",
"q": "^1.4.1",
"qs": "^5.2.0",
"qs": "^4.0.0",
"raven-js": "^1.1.19",
"react": "0.13.2",
"react-bootstrap": "0.25.1",
@ -85,7 +86,6 @@
"react-textarea-autosize": "^2.5.2",
"reactify": "^1.1.0",
"shmui": "^0.1.0",
"snake-case": "^1.1.1",
"spark-md5": "~1.0.0",
"uglifyjs": "^2.4.10",
"vinyl-buffer": "^1.0.0",