GithubHelp home page GithubHelp logo

gc-victor / istype Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 124 KB

Some isTypes methods like isArray, isBoolean, isDate, isFunction, isNumber, isObject, isRegExp, isUndefined and isString.

JavaScript 100.00%

istype's Introduction

@)isType._

Some isType like isArray, isBoolean, isDate, isFunction, isNumber, isObject, isRegExp, isUndefined and isString.

Usage

isArray

$.isArray([]); // => true
$.isArray('Hello World!'); // => false

isBoolean

$.isBoolean(false); // => true
$.isBoolean('Hello World!'); // => false

isDate

$.isDate(new Date()); // => true
$.isDate('Hello World!'); // => false

isFunction

$.isFunction(function () {}); // => true
$.isFunction('Hello World!'); // => false

isNaN

$.isNaN(NaN); // => true
$.isNaN(0); // => false

isNumber

$.isNumber(0); // => true
$.isNumber(NaN); // => false

isObject

$.isObject({}); // => true
$.isObject('Hello World!'); // => false

isRegExp

$.isRegExp(/0/); // => true
$.isRegExp('Hello World!'); // => false

isString

$.isString(''); // => true
$.isString([]); // => false

isUndefined

$.isUndefined(undefined); // => true
$.isUndefined('Hello World!'); // => false

lt-ie9

var arrayPrototype = Array.prototype;

arrayPrototype.forEach || (arrayPrototype.forEach = function(b, c) {
  var a = 0,
    i = this.length;
  for(a; a < i; a += 1) b.call(c, this[a], a, this)
});

Inspiration

Author

License

Public domain: http://unlicense.org/

istype's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

istype's Issues

$.isNumber(NaN); // => true

Hey,
Just stumbled on this project - one thing to look out for is;

$.isNumber(NaN); // => true

You may not be affected by this, but just a heads up - thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.