of

1.0.0 • Public • Published

of

type checking

check type of value. returns capitalised name of type. e.g., 'Object', 'Function', 'Array':

of.type(value);

returns true if value is an element, otherwise false:

of.element(value);

returns true if value is a string, otherwise false:

of.string(value);

returns true if value is an array, otherwise false:

of.array(value);

returns true if value is an object, otherwise false:

of.object(value);

returns true if value is a function, otherwise false:

of['function'](value);

returns true if value is a boolean, otherwise false:

of.boolean(value);

returns true if value is a number, otherwise false:

of.number(value);

returns true if value is undefined, otherwise false:

of['undefined'](value);

returns true if value is an arguments array, otherwise false:

of['arguments'](value);

returns true if value is a regex, otherwise false:

of.regex(value);

returns true if value is null, otherwise false:

of['null'](value);

returns true if value is a date object, otherwise false:

of.date(value);

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i of

      Weekly Downloads

      320

      Version

      1.0.0

      License

      ISC

      Last publish

      Collaborators

      • ergusto