A factory function that creates a function to check if the payload is one of the given types.
import { isOneOf, isNull, isUndefined } from 'is-what' const isNullOrUndefined = isOneOf(isNull, isUndefined) isNullOrUndefined(null) // true isNullOrUndefined(undefined) // true isNullOrUndefined(123) // false Copy
import { isOneOf, isNull, isUndefined } from 'is-what' const isNullOrUndefined = isOneOf(isNull, isUndefined) isNullOrUndefined(null) // true isNullOrUndefined(undefined) // true isNullOrUndefined(123) // false
A factory function that creates a function to check if the payload is one of the given types.
Example