@aptoma/aoi-smart-crop
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -18,5 +18,6 @@ 'use strict'; | ||
* @param {String} transformToken | ||
* @param {Object} params extra GET params | ||
* @return {String} | ||
*/ | ||
exports.getResizedImageUrl = (imageUrl, targetSize, actions, transformToken) => { | ||
exports.getResizedImageUrl = (imageUrl, targetSize, actions, transformToken, params = {}) => { | ||
normalizeActions(actions); | ||
@@ -39,3 +40,3 @@ const baseUrl = imageUrl.split('?')[0]; | ||
function actionsToQueryParam(actions) { | ||
return decodeURI(qs.stringify({t: actions})); | ||
return decodeURI(qs.stringify(Object.assign({}, params, {t: actions}))); | ||
} | ||
@@ -42,0 +43,0 @@ |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "Helper library for doing smart crops of images based on area of interest data", | ||
@@ -10,0 +10,0 @@ "main": "lib/index.js", |
23142
8
597