UNPKG

460 BTypeScriptView Raw
1import type { HexString } from '../types.js';
2/**
3 * @name hexHasPrefix
4 * @summary Tests for the existence of a `0x` prefix.
5 * @description
6 * Checks for a valid hex input value and if the start matched `0x`
7 * @example
8 * <BR>
9 *
10 * ```javascript
11 * import { hexHasPrefix } from '@polkadot/util';
12 *
13 * console.log('has prefix', hexHasPrefix('0x1234')); // => true
14 * ```
15 */
16export declare function hexHasPrefix(value?: string | null): value is HexString;