@cloudinary-util/util
Advanced tools
Comparing version 2.0.1 to 2.1.0
@@ -23,2 +23,3 @@ "use strict"; | ||
__export(src_exports, { | ||
convertColorHexToRgb: () => convertColorHexToRgb, | ||
encodeBase64: () => encodeBase64, | ||
@@ -29,3 +30,4 @@ getPublicId: () => getPublicId, | ||
parseUrl: () => parseUrl, | ||
sortByKey: () => sortByKey | ||
sortByKey: () => sortByKey, | ||
testColorIsHex: () => testColorIsHex | ||
}); | ||
@@ -89,2 +91,12 @@ module.exports = __toCommonJS(src_exports); | ||
// src/lib/colors.ts | ||
function testColorIsHex(value) { | ||
if (typeof value !== "string") | ||
return false; | ||
return !!value.startsWith("#"); | ||
} | ||
function convertColorHexToRgb(value) { | ||
return `rgb:${value.replace("#", "")}`; | ||
} | ||
// src/lib/util.ts | ||
@@ -131,2 +143,3 @@ function encodeBase64(value) { | ||
0 && (module.exports = { | ||
convertColorHexToRgb, | ||
encodeBase64, | ||
@@ -137,3 +150,4 @@ getPublicId, | ||
parseUrl, | ||
sortByKey | ||
sortByKey, | ||
testColorIsHex | ||
}); |
@@ -34,2 +34,11 @@ /** | ||
/** | ||
* testColorIsHex | ||
*/ | ||
declare function testColorIsHex(value: any): boolean; | ||
/** | ||
* convertColorHexToRgb | ||
*/ | ||
declare function convertColorHexToRgb(value: string): string; | ||
/** | ||
* encodeBase64 | ||
@@ -53,2 +62,2 @@ * @description Universally returns a base64 encoded string | ||
export { ParseUrl, encodeBase64, getPublicId, getTransformations, objectHasKey, parseUrl, sortByKey }; | ||
export { ParseUrl, convertColorHexToRgb, encodeBase64, getPublicId, getTransformations, objectHasKey, parseUrl, sortByKey, testColorIsHex }; |
@@ -23,2 +23,3 @@ "use strict"; | ||
__export(src_exports, { | ||
convertColorHexToRgb: () => convertColorHexToRgb, | ||
encodeBase64: () => encodeBase64, | ||
@@ -29,3 +30,4 @@ getPublicId: () => getPublicId, | ||
parseUrl: () => parseUrl, | ||
sortByKey: () => sortByKey | ||
sortByKey: () => sortByKey, | ||
testColorIsHex: () => testColorIsHex | ||
}); | ||
@@ -89,2 +91,12 @@ module.exports = __toCommonJS(src_exports); | ||
// src/lib/colors.ts | ||
function testColorIsHex(value) { | ||
if (typeof value !== "string") | ||
return false; | ||
return !!value.startsWith("#"); | ||
} | ||
function convertColorHexToRgb(value) { | ||
return `rgb:${value.replace("#", "")}`; | ||
} | ||
// src/lib/util.ts | ||
@@ -131,2 +143,3 @@ function encodeBase64(value) { | ||
0 && (module.exports = { | ||
convertColorHexToRgb, | ||
encodeBase64, | ||
@@ -137,3 +150,4 @@ getPublicId, | ||
parseUrl, | ||
sortByKey | ||
sortByKey, | ||
testColorIsHex | ||
}); |
{ | ||
"name": "@cloudinary-util/util", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"main": "./dist/index.js", | ||
@@ -5,0 +5,0 @@ "module": "./dist/index.mjs", |
Sorry, the diff of this file is not supported yet
19670
464