@waiting/shared-core
Advanced tools
Comparing version 14.1.0 to 14.1.1
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 14.0.0 | ||
* @version 14.1.0 | ||
* @author waiting | ||
@@ -408,8 +408,4 @@ * @license MIT | ||
function snakeToCamel(input) { | ||
const line = input.replace(/-/gu, '_'); | ||
const ret = line.replace(/_./gu, (match) => { | ||
const str = match.toUpperCase(); | ||
return str.slice(1); | ||
}); | ||
return ret; | ||
return input.replace(/-/ug, '_') | ||
.replace(/_./ug, match => match.toUpperCase().slice(1)); | ||
} | ||
@@ -416,0 +412,0 @@ /** |
@@ -12,8 +12,4 @@ /** | ||
export function snakeToCamel(input) { | ||
const line = input.replace(/-/gu, '_'); | ||
const ret = line.replace(/_./gu, (match) => { | ||
const str = match.toUpperCase(); | ||
return str.slice(1); | ||
}); | ||
return ret; | ||
return input.replace(/-/ug, '_') | ||
.replace(/_./ug, match => match.toUpperCase().slice(1)); | ||
} | ||
@@ -20,0 +16,0 @@ /** |
{ | ||
"name": "@waiting/shared-core", | ||
"author": "waiting", | ||
"version": "14.1.0", | ||
"version": "14.1.1", | ||
"description": "node core function re export with Promise or Observable", | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@waiting/shared-types": "^14.1.0", | ||
"@waiting/shared-types": "^14.1.1", | ||
"rxjs": "7" | ||
@@ -95,3 +95,3 @@ }, | ||
}, | ||
"gitHead": "315bf970e4e081c1483a8917d46de68f9827bc5a" | ||
"gitHead": "67d9ae3c4124eba3d14bb41a72d65537315de983" | ||
} |
@@ -16,8 +16,4 @@ /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ | ||
export function snakeToCamel<T extends string = string>(input: T): SnakeToCamel<T> { | ||
const line = input.replace(/-/gu, '_') | ||
const ret = line.replace(/_./gu, (match) => { | ||
const str = match.toUpperCase() | ||
return str.slice(1) | ||
}) | ||
return ret as SnakeToCamel<T> | ||
return input.replace(/-/ug, '_') | ||
.replace(/_./ug, match => match.toUpperCase().slice(1)) as SnakeToCamel<T> | ||
} | ||
@@ -24,0 +20,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81473
2181