@endpass/utils
Advanced tools
Comparing version 1.7.0 to 1.8.0
{ | ||
"name": "@endpass/utils", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"description": "Utils and helper functions", | ||
@@ -5,0 +5,0 @@ "author": "Endpass, Inc", |
@@ -10,3 +10,19 @@ 'use strict'; | ||
return new RegExp(b, 'i').test(a); | ||
}, | ||
/** | ||
* Transform hex encoded string to utf8 | ||
* @param {string} str String in hex encoding | ||
* @returns {string} | ||
*/ | ||
fromHexToUtf8: function fromHexToUtf8(str) { | ||
var source = str.replace(/^0x/, ''); | ||
var decodedString = ''; | ||
for (var i = 0; i < source.length; i += 2) { | ||
decodedString += String.fromCharCode(parseInt(source.substr(i, 2), 16)); | ||
} | ||
return decodeURIComponent(escape(decodedString)); | ||
} | ||
}; |
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
28592
766