postman-url-encoder
Advanced tools
Comparing version 2.1.0-beta.1 to 2.1.0-beta.2
@@ -85,8 +85,19 @@ /** | ||
*/ | ||
domainToASCII = typeof url.domainToASCII === 'function' ? | ||
// use faster internal method | ||
url.domainToASCII : | ||
domainToASCII = (function () { | ||
var domainToASCII = url.domainToASCII; | ||
// @note In Electron v3.1.8, the Node.js native url.domainToASCII | ||
// doesn't work as expected. ¯\_(ツ)_/¯ | ||
// so, check if it convert's '😎' to 'xn--s28h' or not. | ||
// @todo Remove this hack on Electron >= 4 | ||
/* istanbul ignore next */ | ||
if (typeof domainToASCII === 'function' && domainToASCII('😎') === 'xn--s28h') { | ||
// use faster native method | ||
return domainToASCII; | ||
} | ||
// else, lazy load `punycode` dependency | ||
/* istanbul ignore next */ | ||
require('punycode').toASCII; | ||
return require('punycode').toASCII; | ||
}()); | ||
@@ -93,0 +104,0 @@ /** |
@@ -5,3 +5,3 @@ { | ||
"author": "Postman Labs <help@getpostman.com>", | ||
"version": "2.1.0-beta.1", | ||
"version": "2.1.0-beta.2", | ||
"license": "Apache-2.0", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
160511
3505