Skip to content
Noboru Okazaki edited this page Jul 26, 2017 · 7 revisions

is(value)

try to return value's constructor
return type: Function || null || undefined

Basically "is[methods]" are matching value of type

return type: Boolean;

  • is.array(value);
  • is.object(value);
  • is.function(value);
  • is.generator(value);
  • is.boolean(value);
  • is.string(value);
  • is.number(value);
  • is.symbol(value);
  • is.null(value);
  • is.defined(value); is value not undefined;

Applicably "is[methods]" are useful case;

return type: Boolean;

  • is.blank(value)
    If value is blank string, return true.
  • is.pure(value)
    If value is Object or Array, return true.
  • is.nan(value)
    If value is primitive Number but Value is NaN, return true.
  • is.self(proto)
    If proto is proto.constructor.prototype, return true.
  • is.valid(value)
    If value is held any value, return true.
  • is.there(value)
    If Array or Object is held something, return true.
  • is.held(value)(super)
    If value is instance of super, return true.
  • is.iterable(value)
    If value made generator's object, return true.

Foundation

Browser

Clone this wiki locally