JSFiddle

  • angular.isUndefined()

    No-Library (pure JS), HTML, CSS, JavaScript

    try {
    console.log(angular.isUndefined(foo));  //  throws error!
    } catch(e) {
        console.log(e); 
    }
    var bar;
    console.log(angular.isUndefined(bar ...
  • angular.isString() #2 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    console.log(angular.isString('hello'));  //  true
    console.log(angular.isString(new String('hello')));  //  false!
    
    var foo = new String('foo');
    
    console ...
  • angular.isObject() #4 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    console.log(angular.isObject({}));  // true
    console.log(angular.isObject(1));  // false
    console.log(angular.isObject('anobject?'));  //  false
    console.log(angular ...
  • angular.isNumber()

    No-Library (pure JS), HTML, CSS, JavaScript

    console.log(angular.isNumber(3));  //  true
    console.log(angular.isNumber(1.2));  //  true
    console.log(angular.isNumber('1'));  //  false
  • angular.isFunction()

    No-Library (pure JS), HTML, CSS, JavaScript

    
    var func = function () {};
    
    console.log(angular.isFunction(func));  //  true
    
    console.log(angular.isFunction(''));  //  true
  • angular.isElement() #4 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    var foo = document.getElementById('foo');
    
    console.log(angular.isElement(foo));  //  true
    
    console.log(angular.isElement(''));  //  false
    
  • angular.isDefined() #9 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    var foo;
    
    console.log(angular.isDefined(foo)); // false
    
    foo = "foo";
    
    console.log(angular.isDefined(foo)); // true
    
  • angular.isDate()

    No-Library (pure JS), HTML, CSS, JavaScript

    var date = new Date();
    
    console.log(angular.isDate(date));  //  true
    
    var foo = {};
    
    console.log(angular.isDate(foo));  //  false
    
    
  • angular.isArray() #4 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    var array = [];
    console.log(angular.isArray(array));  //  true
    
    var string = '';
    console.log(angular.isArray(string));  // false
  • angular.identity() #6 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    var foo = angular.identity('this is foo');
    
    console.log(foo);