@tetcoin/util
Version:
A collection of useful utilities for @tetcoin
16 lines (15 loc) • 402 B
TypeScript
/**
* @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 '@tetcoin/util';
*
* console.log('has prefix', hexHasPrefix('0x1234')); // => true
* ```
*/
export default function hexHasPrefix(value?: string | null): boolean;