mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 10:25:08 +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:
parent
fe4e337690
commit
955e20d6b6
@ -1,7 +1,7 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
import camelCase from 'camelcase';
|
import camelCase from 'camelcase';
|
||||||
import snakeCase from 'snake-case';
|
import decamelize from 'decamelize';
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
|
|
||||||
import { sanitize } from './general_utils';
|
import { sanitize } from './general_utils';
|
||||||
@ -33,7 +33,7 @@ export function argsToQueryParams(obj) {
|
|||||||
Object
|
Object
|
||||||
.keys(sanitizedObj)
|
.keys(sanitizedObj)
|
||||||
.forEach((key) => {
|
.forEach((key) => {
|
||||||
queryParamObj[snakeCase(key)] = sanitizedObj[key];
|
queryParamObj[decamelize(key)] = sanitizedObj[key];
|
||||||
});
|
});
|
||||||
|
|
||||||
// Use bracket arrayFormat as history.js and react-router use it
|
// Use bracket arrayFormat as history.js and react-router use it
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
"camelcase": "^1.2.1",
|
"camelcase": "^1.2.1",
|
||||||
"classnames": "^1.2.2",
|
"classnames": "^1.2.2",
|
||||||
"compression": "^1.4.4",
|
"compression": "^1.4.4",
|
||||||
|
"decamelize": "^1.1.1",
|
||||||
"envify": "^3.4.0",
|
"envify": "^3.4.0",
|
||||||
"eslint": "^0.22.1",
|
"eslint": "^0.22.1",
|
||||||
"eslint-plugin-react": "^2.5.0",
|
"eslint-plugin-react": "^2.5.0",
|
||||||
@ -74,7 +75,7 @@
|
|||||||
"object-assign": "^2.0.0",
|
"object-assign": "^2.0.0",
|
||||||
"opn": "^3.0.2",
|
"opn": "^3.0.2",
|
||||||
"q": "^1.4.1",
|
"q": "^1.4.1",
|
||||||
"qs": "^5.2.0",
|
"qs": "^4.0.0",
|
||||||
"raven-js": "^1.1.19",
|
"raven-js": "^1.1.19",
|
||||||
"react": "0.13.2",
|
"react": "0.13.2",
|
||||||
"react-bootstrap": "0.25.1",
|
"react-bootstrap": "0.25.1",
|
||||||
@ -85,7 +86,6 @@
|
|||||||
"react-textarea-autosize": "^2.5.2",
|
"react-textarea-autosize": "^2.5.2",
|
||||||
"reactify": "^1.1.0",
|
"reactify": "^1.1.0",
|
||||||
"shmui": "^0.1.0",
|
"shmui": "^0.1.0",
|
||||||
"snake-case": "^1.1.1",
|
|
||||||
"spark-md5": "~1.0.0",
|
"spark-md5": "~1.0.0",
|
||||||
"uglifyjs": "^2.4.10",
|
"uglifyjs": "^2.4.10",
|
||||||
"vinyl-buffer": "^1.0.0",
|
"vinyl-buffer": "^1.0.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user