cloudimage-responsive-utils
Advanced tools
Comparing version 2.1.0-beta.1 to 2.2.0
@@ -29,2 +29,7 @@ # Changelog | ||
# 2.2.0 - 2021-06-16 | ||
### Added | ||
- set a custom domain property. This is useful for where a business wants to use a custom cname instead of the default | ||
cloudimage.io URL. | ||
# 2.1.0 - 2020-12-17 | ||
@@ -31,0 +36,0 @@ ### Added |
@@ -51,4 +51,6 @@ "use strict"; | ||
domain = config.domain, | ||
doNotReplaceURL = config.doNotReplaceURL; | ||
var url = [doNotReplaceURL ? '' : "https://".concat(token, ".").concat(domain, "/v7/"), src, src.indexOf('?') !== -1 ? '&' : '?'].join(''); | ||
doNotReplaceURL = config.doNotReplaceURL, | ||
customDomain = config.customDomain; | ||
var finalDomain = customDomain ? domain : token + '.' + domain; | ||
var url = [doNotReplaceURL ? '' : "https://".concat(finalDomain, "/v7/"), src, src.indexOf('?') !== -1 ? '&' : '?'].join(''); | ||
return [processURL ? processURL({ | ||
@@ -55,0 +57,0 @@ url: url, |
{ | ||
"name": "cloudimage-responsive-utils", | ||
"version": "2.1.0-beta.1", | ||
"version": "2.2.0", | ||
"description": "cloudimage responsive utils", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -8,5 +8,8 @@ import { DEVICE_PIXEL_RATIO_LIST } from '../constants'; | ||
const { width, height } = size || {}; | ||
const { token, domain, doNotReplaceURL } = config; | ||
const { token, domain, doNotReplaceURL, customDomain } = config; | ||
const finalDomain = customDomain ? domain : token + '.' + domain; | ||
const url =[ | ||
doNotReplaceURL ? '' : `https://${token}.${domain}/v7/`, | ||
doNotReplaceURL ? '' : `https://${finalDomain}/v7/`, | ||
src, | ||
@@ -13,0 +16,0 @@ src.includes('?') ? '&' : '?' |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
102119
2471
0