@teleporthq/teleport-shared
Advanced tools
Comparing version
@@ -5,3 +5,3 @@ "use strict"; | ||
var camelCaseToDashCase = function (str) { | ||
return str.replace(/([a-zA-Z])(?=[A-Z])/g, '$1-').toLowerCase(); | ||
return str.replace(/([a-z])(?=[A-Z])|([A-Z0-9])(?=[A-Z][a-z])/g, '$1-').toLowerCase(); | ||
}; | ||
@@ -8,0 +8,0 @@ exports.camelCaseToDashCase = camelCaseToDashCase; |
export var camelCaseToDashCase = function (str) { | ||
return str.replace(/([a-zA-Z])(?=[A-Z])/g, '$1-').toLowerCase(); | ||
return str.replace(/([a-z])(?=[A-Z])|([A-Z0-9])(?=[A-Z][a-z])/g, '$1-').toLowerCase(); | ||
}; | ||
@@ -4,0 +4,0 @@ export var dashCaseToCamelCase = function (str) { |
{ | ||
"name": "@teleporthq/teleport-shared", | ||
"version": "0.25.2", | ||
"version": "0.25.4", | ||
"description": "A utility belt for the entire teleportHQ ecosystem", | ||
@@ -32,3 +32,3 @@ "author": "teleportHQ", | ||
}, | ||
"gitHead": "930abc0a683481ebbf1949068f5590d54df0b703" | ||
"gitHead": "2b088c68b30fb290503a8c586d5d88a3c3c58d00" | ||
} |
export const camelCaseToDashCase = (str: string): string => | ||
str.replace(/([a-zA-Z])(?=[A-Z])/g, '$1-').toLowerCase() | ||
str.replace(/([a-z])(?=[A-Z])|([A-Z0-9])(?=[A-Z][a-z])/g, '$1-').toLowerCase() | ||
@@ -4,0 +4,0 @@ export const dashCaseToCamelCase = (str: string): string => |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
166606
0.04%