@codecademy/gamut
68.2.268.2.3-alpha.c8dfb9.0
dist/utils/nullish.js+
dist/utils/nullish.jsNew file+11
Index: package/dist/utils/nullish.js
===================================================================
--- package/dist/utils/nullish.js
+++ package/dist/utils/nullish.js
@@ -0,0 +1,11 @@
+/**
+ * True when `value` is `null` or `undefined`.
+ * Use instead of `value == null` when `eqeqeq` is enforced.
+ */
+export const isNullish = value => value === null || value === undefined;
+
+/**
+ * True when `value` is neither `null` nor `undefined`.
+ * Use instead of `value != null` when `eqeqeq` is enforced.
+ */
+export const isDefined = value => value !== undefined && value !== null;
\ No newline at end of file