UNPKG

sd-is

Version:

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

11 lines (9 loc) 298 B
export default function isUndefined(value) { const isUndef = typeof value === 'undefined'; return { ok: isUndef, verdict: isUndef ? "✅ It's undefined." : "❌ It's defined.", reason: isUndef ? "No value present." : "Value is present.", fix: () => undefined, }; }