cloudinary-core
Advanced tools
Comparing version 2.8.2 to 2.9.0
@@ -553,3 +553,3 @@ export as namespace cloudinary; | ||
fontHinting(value: string): TextLayer; | ||
fontAntiAliasing(value: string): TextLayer; | ||
fontAntialiasing(value: string): TextLayer; | ||
textDecoration(value: string): TextLayer; | ||
@@ -634,3 +634,7 @@ textAlign(value: string): TextLayer; | ||
* @example | ||
* // Include cloudinary_js in a <script> tag, then: | ||
* var cl = new cloudinary.Cloudinary( { cloud_name: "mycloud"}); | ||
* // Or import it from the npm package: | ||
* import { Cloudinary } from 'cloudinary-core'; | ||
* var cl = new Cloudinary( { cloud_name: "mycloud"}); | ||
* var imgTag = cl.image("myPicID"); | ||
@@ -637,0 +641,0 @@ */ |
{ | ||
"name": "cloudinary-core", | ||
"version": "2.8.2", | ||
"version": "2.9.0", | ||
"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", |
@@ -34,3 +34,3 @@ /** | ||
static normalize(expression) { | ||
var operators, pattern, replaceRE; | ||
var operators, operatorsPattern, operatorsReplaceRE, predefinedVarsPattern, predefinedVarsReplaceRE; | ||
if (expression == null) { | ||
@@ -40,8 +40,14 @@ return expression; | ||
expression = String(expression); | ||
operators = "\\|\\||>=|<=|&&|!=|>|=|<|/|-|\\+|\\*"; | ||
pattern = "((" + operators + ")(?=[ _])|" + Object.keys(Expression.PREDEFINED_VARS).join("|") + ")"; | ||
replaceRE = new RegExp(pattern, "g"); | ||
expression = expression.replace(replaceRE, function (match) { | ||
return Expression.OPERATORS[match] || Expression.PREDEFINED_VARS[match]; | ||
}); | ||
operators = "\\|\\||>=|<=|&&|!=|>|=|<|/|-|\\+|\\*|\\^"; | ||
// operators | ||
operatorsPattern = "((" + operators + ")(?=[ _]))"; | ||
operatorsReplaceRE = new RegExp(operatorsPattern, "g"); | ||
expression = expression.replace(operatorsReplaceRE, match => Expression.OPERATORS[match]); | ||
// predefined variables | ||
predefinedVarsPattern = "(" + Object.keys(Expression.PREDEFINED_VARS).join("|") + ")"; | ||
predefinedVarsReplaceRE = new RegExp(predefinedVarsPattern, "g"); | ||
expression = expression.replace(predefinedVarsReplaceRE, (match, p1, offset) => (expression[offset - 1] === '$' ? match : Expression.PREDEFINED_VARS[match])); | ||
return expression.replace(/[ _]+/g, '_'); | ||
@@ -292,3 +298,4 @@ } | ||
"+": "add", | ||
"-": "sub" | ||
"-": "sub", | ||
"^": "pow", | ||
}; | ||
@@ -304,2 +311,3 @@ | ||
"currentPage": "cp", | ||
"preview:duration": "preview:duration", | ||
"duration": "du", | ||
@@ -306,0 +314,0 @@ "face_count": "fc", |
@@ -758,2 +758,6 @@ import Expression from './expression'; | ||
ocr(value) { | ||
return this.param(value, "ocr", "ocr"); | ||
} | ||
offset(value) { | ||
@@ -913,2 +917,3 @@ var end_o, start_o; | ||
"keyframeInterval", | ||
"ocr", | ||
"offset", | ||
@@ -915,0 +920,0 @@ "opacity", |
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
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
1824387
22090