Functions Flashcards
angular.lowercase
Converts the specified string to lowercase.
angular.uppercase
Converts the specified string to uppercase.
angular.forEach
Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key, obj), where value is the value of an object property or an array element, key is the object property key or array element index and obj is theobj itself. Specifying a context for the function is optional.
angular.extend
Extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.extend({}, object1, object2).
angular.merge
Deeply extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.merge({}, object1, object2).
angular.noop
A function that performs no operations. This function can be useful when writing code in the functional style. function foo(callback) { var result = calculateResult(); (callback || angular.noop)(result); }
angular.identity
A function that returns its first argument. This function is useful when writing code in the functional style.
angular.isUndefined
Determines if a reference is undefined.
angular.isDefined
Determines if a reference is defined.
angular.isObject
Determines if a reference is an Object. Unlike typeof in JavaScript, nulls are not considered to be objects. Note that JavaScript arrays are objects.
angular.isString
Determines if a reference is a String.
angular.isNumber
Determines if a reference is a Number.
angular.isDate
Determines if a value is a date.
angular.isArray
Determines if a reference is an Array.
angular.isFunction
Determines if a reference is a Function.