Global

Members

constant apply

Created by elydelacruz on 9/7/2017.

constant some

Returns `true` if `fn` (predicate) returns true for at least one item in functor else returns `false`.

Methods

defineReverse() → {function}

Array.prototype.reverse generator (generates a function that calls the prototype version or a shimmed version if it doesn't exist).
Returns:
function

Type Definitions

Any

Synonym for 'any value'.

DefinePropArgsTuple

Arguments list for `defineProp` and/or `defineEnumProp` (note: some parts of array/tuple are options (namely the last two args)); E.g., ``` [String, [someTarget], 'somePropName', 'someDefaultValue] // ... ```

Descriptor

ErrorIfNotType(type, contextName, valueName, value) → {*}

Used to ensure value matches passed in type.
Parameters:
Name Type Description
type TypeRef Constructor name or constructor.
contextName String
valueName String
value *
Throws:
- If value doesn't match type.
Type
Error
Returns:
* - - What ever value is.

ErrorIfNotTypes(valueTypes, contextName, valueName, value) → {*}

Used to ensure a value matches one of one or more types passed in.
Parameters:
Name Type Description
valueTypes TypesArray Array of constructor names or constructors.
contextName String
valueName String
value *
Throws:
- If value doesn't match type.
Type
Error
Returns:
* - - Whatever value is.

ErrorMessageCall(tmplContext) → {String}

Error message template function.
Parameters:
Name Type Description
tmplContext TemplateContext
Returns:
String

PropsDefinerCall(argsTuple, target) → {Array.<TargetDescriptorTuple>}

Same type as `defineProp` and `defineEnumProp`
Parameters:
Name Type Description
argsTuple DefinePropArgsTuple
target Target
Returns:
Array.<TargetDescriptorTuple>

Target

TargetDescriptorTuple

TemplateContext

Template context used for error message renderers (functions that take a context obj and return a string).
Properties:
Name Type Attributes Default Description
value *
valueName String
expectedTypeName String Expected name of constructor of `value`; E.g., usually `SomeConstructor.name`;
foundTypeName String Found types name; E.g., `FoundConstructor.name`;
messageSuffix * <optional>
null Message suffix (sometimes an extra hint or instructions for directing user to fix where his/her error has occurred). Optional.

TypeChecker(Type, value) → {Boolean}

Checks whether a value is of given type.
Parameters:
Name Type Description
Type TypeRef a Type or it's name; E.g., `Type.name`.
value *
Returns:
Boolean

TypeRef()

Type reference. Type itself or Type's name; E.g., `Type.name`;

TypeRef()

Type reference. Either actual type or type's name; E.g., `Type.name` Also note: Class cased names are use for values that do not have `name` properties; Namely: 'Null', 'NaN' and 'Undefined' (for their respective values respectively).

TypesArray