New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cloudinary-util/util

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudinary-util/util - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

14

./dist/index.js

@@ -25,2 +25,3 @@ "use strict";

encodeBase64: () => encodeBase64,
getFormat: () => getFormat,
getPublicId: () => getPublicId,

@@ -50,7 +51,5 @@ getTransformations: () => getTransformations,

const [baseUrlWithExtension, queryString] = src.split("?");
const formatMatches = baseUrlWithExtension.match(REGEX_FORMAT);
const format = getFormat(baseUrlWithExtension);
let baseUrl = baseUrlWithExtension;
let format;
if (formatMatches !== null) {
format = `${formatMatches[0]}`;
if (format) {
baseUrl = baseUrlWithExtension.replace(new RegExp(`${format}$`), "");

@@ -93,2 +92,8 @@ }

}
function getFormat(src) {
const matches = src.match(REGEX_FORMAT);
if (matches === null)
return;
return matches[0];
}

@@ -148,2 +153,3 @@ // src/lib/colors.ts

encodeBase64,
getFormat,
getPublicId,

@@ -150,0 +156,0 @@ getTransformations,

@@ -21,5 +21,5 @@ /**

* getPublicId
* @description Retrieves the public id of a cloudiary image url. If no url is recognized it returns the parameter it self.
* @description Retrieves the public id of a Cloudinary image url. If no url is recognized it returns the parameter it self.
* If it's recognized that is a url and it's not possible to get the public id, it warns the user.
* @param {string} src: The cloudiary url or public id.
* @param {string} src: The Cloudinary url or public id.
*/

@@ -30,5 +30,11 @@ declare function getPublicId(src: string): string | undefined;

* @description Retrieves the transformations added to a Cloudinary image url. If no transformation is recognized it returns an empty array.
* @param {string} src: The cloudiary url
* @param {string} src: The Cloudinary url
*/
declare function getTransformations(src: string): string[][];
/**
* getFormat
* @description Retrieves the format of a given string
* @param {string} src: The Cloudinary url or any string trying to match the format
*/
declare function getFormat(src: string): string | undefined;

@@ -63,2 +69,2 @@ /**

export { ParseUrl, convertColorHexToRgb, encodeBase64, getPublicId, getTransformations, objectHasKey, parseUrl, sortByKey, testColorIsHex };
export { ParseUrl, convertColorHexToRgb, encodeBase64, getFormat, getPublicId, getTransformations, objectHasKey, parseUrl, sortByKey, testColorIsHex };

@@ -25,2 +25,3 @@ "use strict";

encodeBase64: () => encodeBase64,
getFormat: () => getFormat,
getPublicId: () => getPublicId,

@@ -50,7 +51,5 @@ getTransformations: () => getTransformations,

const [baseUrlWithExtension, queryString] = src.split("?");
const formatMatches = baseUrlWithExtension.match(REGEX_FORMAT);
const format = getFormat(baseUrlWithExtension);
let baseUrl = baseUrlWithExtension;
let format;
if (formatMatches !== null) {
format = `${formatMatches[0]}`;
if (format) {
baseUrl = baseUrlWithExtension.replace(new RegExp(`${format}$`), "");

@@ -93,2 +92,8 @@ }

}
function getFormat(src) {
const matches = src.match(REGEX_FORMAT);
if (matches === null)
return;
return matches[0];
}

@@ -148,2 +153,3 @@ // src/lib/colors.ts

encodeBase64,
getFormat,
getPublicId,

@@ -150,0 +156,0 @@ getTransformations,

{
"name": "@cloudinary-util/util",
"version": "2.2.1",
"version": "2.3.0",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "module": "./dist/index.mjs",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc