Converts JavaScript function arguments to an array.
any[] args2range(
arguments args,
integer min,
integer max)
Function arguments parser for 'range' functions.
Creates a new object with the argument objects as prototype.
'intOf' truncates the input to an int if the input object is a number.
any[] map(
function f,
any[] as)
Applies function 'f' on all elements of array 'as'.
Merges argument objects together.
'typeOf' extends JavaScript 'typeof' operator with
support for 'null', 'undefined', 'array' and
'date' types.
any[] args2array(arguments args)
Parameters:
args
- the JavaScript function 'arguments'.
Defined in Popcorn.Core
any[] args2range(arguments args, integer min, integer max)
Parameters:
args
- the JavaScript function 'arguments'.
min
- range min value used when no arguments are passed to the range function.
max
- range max value used when no or one argument is passed to the range function.
Defined in Popcorn.Core
any[] arrayOf(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
the input object if it is an array and throws an exception otherwise.
Throws:
an exception if input is not an array.
Defined in Popcorn.Core
object clone(object o)
Defined in Popcorn.Core
Parameters:
inp
- any variable, object etc.
Returns:
the input object if it is a date object or a date string.
Throws:
an exception if input is not a date object.
Defined in Popcorn.Core
function functionOf(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
the input object if it is a function and throws an exception otherwise.
Throws:
an exception if input is not a function.
Defined in Popcorn.Core
integer intOf(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
the input object if it is an int and throws an exception otherwise.
Throws:
an exception if input is not an int.
Defined in Popcorn.Core
boolean isArray(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
true if the input is an array.
Defined in Popcorn.Core
boolean isDate(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
true if the input is a date object.
Defined in Popcorn.Core
boolean isFunction(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
true if the input is a function.
Defined in Popcorn.Core
boolean isInt(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
true if the input is an int.
Defined in Popcorn.Core
boolean isNull(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
true if the input is null.
Defined in Popcorn.Core
boolean isNumber(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
true if the input is a number.
Defined in Popcorn.Core
boolean isObject(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
true if the input is an object (not an array of function).
Defined in Popcorn.Core
boolean isString(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
true if the input is a string.
Defined in Popcorn.Core
boolean isUndefined(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
true if the input is undefined.
Defined in Popcorn.Core
any[] map(function f, any[] as)
Parameters:
f
- function.
as
- input array.
Defined in Popcorn.Core
object merge(object+ os)
Parameters:
os
- one ore more objects to merge.
Defined in Popcorn.Core
number numberOf(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
the input object if it is a number and throws an exception otherwise.
Throws:
an exception if input is not a number.
Defined in Popcorn.Core
string stringOf(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
the input object if it is a string and throws an exception otherwise.
Throws:
an exception if input is not a string.
Defined in Popcorn.Core
string typeOf(any inp)
Parameters:
inp
- any variable, object etc.
Returns:
a string representation of the type, for example 'null', 'array', 'data'.
Defined in Popcorn.Core