prose_isit
Copyright (c) 2020 Seán D. Murray SEE MIT LICENSE FILE
A type Utility. Make writing node easier, prettier and less error prone. Writes and reads more like prose
A utility to help discover what type a variable is... or is not.
Notes
This util considers an Array as not an Object, so isit.anObject(['somearray']) is false. However isit.anArray(['somearray']) is true.
Usage
const isit = ; /**True if item is nil (null or undefined), a boolean false or an emtpy: String, Array, Object**/isit; /**False if item is not nil (null or undefined), a boolean true or not an emtpy: String, Array, Object**/isit; /**True if item is an Array**/isit; /**False if item is an Array**/isit; /**True if item is a Booleanif primitiveOnly is false (default) then true only for primative/non-object booleanif primitiveOnly is true, then true for primative and object boolean**/isit; /**False if item is a Booleanif primitiveOnly is false (default) then flase only for primative/non-object booleanif primitiveOnly is true, then false for primative and object boolean**/isit; /**True if item is a function**/isit; /**False if item is a function**/isit; /**True if item is a number**/isit; /**False if item is a number**/isit; //True if not a valid number. /**True if item is an object**/isit; //True if an object, false if an array. /**False if item is an object**/isit; //True not an object and true if an array. /**True if item is a primative: nil (nul or undefined), number, string or boolean (not object boolean).**/isit; //True if a primitive value: undefined, null, number, string, boolean primitive, else false. /**False if item is a primative: nil (nul or undefined), number, string or boolean (not object boolean).**/isit; //True if not a primitive value: undefined, null, number, string, boolean primitive, else false. /**True if item is a string**/isit; //True if a string. /**False if item is a string**/isit; //True if not a string. /**True if item is a file**/isit; //True if a file that exists else false. /**True if item is a file**/isit; //False if a file that exists else true;