mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-25 00:07:58 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.hexHasPrefix = hexHasPrefix;
|
||||
const hex_js_1 = require("../is/hex.js");
|
||||
/**
|
||||
* @name hexHasPrefix
|
||||
* @summary Tests for the existence of a `0x` prefix.
|
||||
* @description
|
||||
* Checks for a valid hex input value and if the start matched `0x`
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* import { hexHasPrefix } from '@pezkuwi/util';
|
||||
*
|
||||
* console.log('has prefix', hexHasPrefix('0x1234')); // => true
|
||||
* ```
|
||||
*/
|
||||
function hexHasPrefix(value) {
|
||||
return !!value && (0, hex_js_1.isHex)(value, -1);
|
||||
}
|
||||
Reference in New Issue
Block a user