Current Folder
This commit is contained in:
1 parent
8b3382289b
commit
cfcada880d
4379 files changed
No files matched your search
-14
@@ -1,14 +0,0 @@
|
||||
var isHexPrefixed = require('is-hex-prefixed');
|
||||
|
||||
/**
|
||||
* Removes '0x' from a given `String` is present
|
||||
* @param {String} str the string value
|
||||
* @return {String|Optional} a string by pass if necessary
|
||||
*/
|
||||
module.exports = function stripHexPrefix(str) {
|
||||
if (typeof str !== 'string') {
|
||||
return str;
|
||||
}
|
||||
|
||||
return isHexPrefixed(str) ? str.slice(2) : str;
|
||||
}
|
||||
Reference in new issue
Block a user