Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
2
import
{ useCallback, useMemo, useRef } from
'react'
;
3
4
const
isHexColor = value => typeof value ===
'string'
&& /^#?[0-9a-fA-F]{3,8}$/.test(value);
5
6
const
createParser = defaultValue => {
7
if
(typeof defaultValue ===
'number'
) {
Callers
1
createParser
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected