UNPKG

sd-is

Version:

Tiny JavaScript type check utility functions with smart developer-friendly feedback.

10 lines (9 loc) 282 B
export default function isSymbol(value) { const ok = typeof value === 'symbol'; return { ok, verdict: ok ? "✅ Value is a Symbol." : "❌ Not a Symbol.", reason: ok ? null : `Expected type "symbol", got "${typeof value}".`, fix: () => Symbol(), }; }