UNPKG

sd-is

Version:

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

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