cloudinary-core
Advanced tools
Comparing version 2.10.0 to 2.10.1
@@ -41,3 +41,3 @@ export as namespace cloudinary; | ||
sdkCode: string; | ||
analytics?: boolean; | ||
urlAnalytics?: boolean; | ||
accessibility?: boolean; | ||
@@ -44,0 +44,0 @@ loading?: string; |
{ | ||
"name": "cloudinary-core", | ||
"version": "2.10.0", | ||
"version": "2.10.1", | ||
"description": "Cloudinary Client Side JS library. Cloudinary streamlines your web application’s image manipulation needs. Cloudinary's cloud-based servers automate image uploading, resizing, cropping, optimizing, sprite generation and more.", | ||
@@ -5,0 +5,0 @@ "main": "cloudinary-core.js", |
@@ -0,1 +1,2 @@ | ||
import stringPad from "./stringPad"; | ||
let chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | ||
@@ -6,3 +7,4 @@ let num = 0; | ||
[...chars].forEach((char) => { | ||
let key = num.toString(2).padStart(6, '0'); | ||
let key = num.toString(2); | ||
key = stringPad(key, 6, '0'); | ||
map[key] = char; | ||
@@ -9,0 +11,0 @@ num++; |
import base64Map from "./base64Map"; | ||
import reverseVersion from "./reverseVersion"; | ||
import stringPad from "./stringPad"; | ||
@@ -25,4 +26,6 @@ /** | ||
// 150,501 -> 100100101111100101 | ||
let paddedBinary = num.toString(2).padStart(paddedStringLength, '0'); | ||
let paddedBinary = num.toString(2); | ||
paddedBinary = stringPad(paddedBinary, paddedStringLength, '0'); | ||
// Stop in case an invalid version number was provided | ||
@@ -29,0 +32,0 @@ // paddedBinary must be built from sections of 6 bits |
@@ -0,1 +1,3 @@ | ||
import stringPad from "./stringPad"; | ||
/** | ||
@@ -16,4 +18,4 @@ * @description A semVer like string, x.y.z or x.y is allowed | ||
return semVer.split('.').reverse().map((segment) => { | ||
return segment.padStart(2, '0'); | ||
return stringPad(segment,2, '0'); | ||
}).join('.'); | ||
} |
@@ -370,3 +370,3 @@ import Transformation from './transformation'; | ||
let resultUrl = urlString(publicId, options); | ||
if(options.analytics) { | ||
if(options.urlAnalytics) { | ||
let analyticsOptions = getAnalyticsOptions(options); | ||
@@ -373,0 +373,0 @@ let sdkAnalyticsSignature = getSDKAnalyticsSignature(analyticsOptions); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1910724
53
22992