Members
(static) META_NODE :String
Meta node name.
Type:
- String
Methods
(static) afterComplete(f, cont)
Execute function f, then function cont. If f returns a promise, cont is executed when the promise resolves.
Parameters:
Name | Type | Description |
---|---|---|
f |
function | function to execute first |
cont |
function | function to execute after f |
(static) canRepresentSubpath(x) → {Boolean}
Check if argument can be valid binding subpath.
Parameters:
Name | Type | Description |
---|---|---|
x |
* |
Returns:
- Type
- Boolean
(static) constantly(x) → {function}
Create constant function (always returning x).
Parameters:
Name | Type | Description |
---|---|---|
x |
* | constant function return value |
Returns:
function always returning x
- Type
- function
(static) find(arr, pred) → {*}
Find array element satisfying the predicate.
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array | array |
pred |
function | predicate accepting current value, index, original array |
Returns:
found value or null
- Type
- *
(static) getPropertyValues(obj) → {Array}
Get values of object properties.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | object |
Returns:
object's properties values
- Type
- Array
(static) identity(x) → {*}
Identity function. Returns its first argument.
Parameters:
Name | Type | Description |
---|---|---|
x |
* | argument to return |
Returns:
its first argument
- Type
- *
(static) joinPaths(path1, path2) → {Array}
Join two array paths.
Parameters:
Name | Type | Description |
---|---|---|
path1 |
Array | array of string and numbers |
path2 |
Array | array of string and numbers |
Returns:
joined path
- Type
- Array
(static) not(x) → {*}
'Not' function returning logical not of its argument.
Parameters:
Name | Type | Description |
---|---|---|
x |
* | argument |
Returns:
!x
- Type
- *
(static) resolveArgs(args, var_args) → {Object}
Resolve arguments. Acceptable spec formats:
- 'foo' - required argument 'foo';
- '?foo' - optional argument 'foo';
- function (arg) { return arg instanceof MyClass ? 'foo' : null; } - checked optional argument.
Optional arguments are matched in order, left to right. Provide check function if you need to allow to skip one optional argument and use sebsequent optional arguments instead.
Returned arguments descriptor contains argument names mapped to resolved values.
Parameters:
Name | Type | Description |
---|---|---|
args |
Array | arguments 'array' |
var_args |
* | arguments specs as a var-args list or array, see method description |
Returns:
arguments descriptor object
- Type
- Object
(static) undefinedOrNull(x) → {Boolean}
Check if argument is undefined or null.
Parameters:
Name | Type | Description |
---|---|---|
x |
* | argument to check |
Returns:
- Type
- Boolean