UNPKG

@tetcoin/util

Version:
16 lines (15 loc) 455 B
/** * @name hexStripPrefix * @summary Strips any leading `0x` prefix. * @description * Tests for the existence of a `0x` prefix, and returns the value without the prefix. Un-prefixed values are returned as-is. * @example * <BR> * * ```javascript * import { hexStripPrefix } from '@tetcoin/util'; * * console.log('stripped', hexStripPrefix('0x1234')); // => 1234 * ``` */ export default function hexStripPrefix(value?: string | null): string;