Skip to content
mckoss edited this page Apr 11, 2011 · 5 revisions

types.js - JavaScript datatype helpers

See types.js source code.

isArguments(value)

Return true iff value is the built-in arguments type.

isArray(value)

Return true iff value is the built-in Array type.

copyArray(value)

Return an array that is a copy of the passed value (may be an Array or arguments).

isType(value, typeString)

Return true iff value is one of these base types: 'number', 'string', 'boolean', 'array', 'function', 'date', 'regexp', 'arguments', 'undefined', or 'null'.

typeOf(value)

Return the built-in type string of value (see list above).

extend(dest, source1, source2, ...)

Copy the properties from each source object into the destination object.

project(obj, propertiesArray)

Return a new object, which is a projection of the original object, containing only the given property names.

getFunctionName(func)

Return the name of the function or empty string if function is anonymous.

Clone this wiki locally