UNPKG

@cookbook/solid-intl

Version:

A universal internationalization (i18n) for Solid inspired by React Intl & FormatJS

37 lines (36 loc) 775 B
import typeOf from "./type-of"; const is = { // @ts-ignore nullish(value) { return value === null || value === undefined; }, // @ts-ignore string(value) { return typeOf(value) === "string"; }, // @ts-ignore number(value) { return typeOf(value) === "number"; }, // @ts-ignore bool(value) { return typeOf(value) === "boolean"; }, // @ts-ignore object(value) { return typeOf(value) === "object"; }, // @ts-ignore array(value) { return Array.isArray(value); }, // @ts-ignore date(value) { return typeOf(value) === "date"; }, // @ts-ignore function(value) { return typeOf(value) === "function"; }, }; export default is;