MCPcopy
hub / github.com/DavidHDev/react-bits / isHexColor

Function isHexColor

src/hooks/useComponentProps.js:4–4  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import { useCallback, useMemo, useRef } from 'react';
3
4const isHexColor = value => typeof value === 'string' && /^#?[0-9a-fA-F]{3,8}$/.test(value);
5
6const createParser = defaultValue => {
7 if (typeof defaultValue === 'number') {

Callers 1

createParserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected