A noop function.
Durandal's version.
Uses require.js to obtain a module. This function returns a promise which resolves with the module instance.
The id of the module to load.
A promise for the loaded module.
Uses require.js to obtain an array of modules. This function returns a promise which resolves with the modules instances in an array.
A promise for the loaded module.
Uses require.js to obtain multiple modules. This function returns a promise which resolves with the module instances in an array.
A promise for the loaded module.
Asserts a condition by throwing an error if the condition fails.
The condition to check.
The message to report in the error if the condition check fails.
Gets/Sets whether or not Durandal is in debug mode.
boolean
Whether or not Durandal is current debugging.
Creates a deferred object which can be used to create a promise. Optionally pass a function action to perform which will be passed an object used in resolving the promise.
The deferred object.
Logs an error.
Logs an error.
Extends the first object with the properties of the following objects.
The target object to extend.
any
Gets the module id for the specified object.
The object whose module id you wish to determine.
string
The module id.
Creates a simple V4 UUID. This should not be used as a PK in your database. It can be used to generate internal, unique ids. For a more robust solution see node-uuid.
string
The guid.
Determines if the specified object is a function arguments object.
boolean
True if matches the type, false otherwise.
Determines if the specified object is an array.
boolean
True if matches the type, false otherwise.
Determines if the specified object is a boolean.
boolean
True if matches the type, false otherwise.
Determines if the specified object is a date.
boolean
True if matches the type, false otherwise.
Determines if the specified object is an html element.
boolean
True if matches the type, false otherwise.
Determines if the specified object is a function.
boolean
True if matches the type, false otherwise.
Determines if the specified object is a number.
boolean
True if matches the type, false otherwise.
Determines if the specified object is a boolean.
boolean
True if matches the type, false otherwise.
Determines if the specified object is a promise.
boolean
True if matches the type, false otherwise.
Determines if the specified object is a string.
boolean
True if matches the type, false otherwise.
Gets all the owned keys of the specified object.
Array<string>
The keys.
Logs data to the console. Pass any number of parameters to be logged. Log output is not processed if the framework is not running in debug mode.
Resolves the default object instance for a module. If the module is an object, the module is returned. If the module is a function, that function is called with new
and it's result is returned.
The module to use to get/create the default object for.
any
The default object for the module.
Sets the module id for the specified object.
The object whose module id you wish to set.
The id to set for the specified object.
Uses a setTimeout to wait the specified milliseconds.
The number of milliseconds to wait.