[Improvement] add utils test cases (#380)

This commit is contained in:
neverland
2017-12-05 21:32:02 +08:00
committed by GitHub
parent 5a17bc520a
commit df835618b0
9 changed files with 191 additions and 67 deletions
+2 -1
View File
@@ -19,9 +19,10 @@ export function get(object, path) {
const camelizeRE = /-(\w)/g;
export function camelize(str) {
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : '');
return str.replace(camelizeRE, (_, c) => c.toUpperCase());
}
export function isAndroid() {
/* istanbul ignore next */
return isServer ? false : /android/.test(navigator.userAgent.toLowerCase());
}