Skip to content
This repository has been archived by the owner on May 10, 2020. It is now read-only.

Commit

Permalink
public properties descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-5v committed May 9, 2013
1 parent 17eb985 commit b980008
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,37 @@ function logic(name, params, options) {

logic.prototype = {

/**
* Dependencies to be loaded,
* before logic can provide it's data
*
* @example
* ['l-1', 'l-2', 'l-3']
* – will load `l-1`, then `l-2`, then `l-3`
* ['l-1', ['l-2', 'l-3'], 'l-4']
* – will load 'l-1', then 'l-2' and 'l-3' at once, then 'l-4'
*
* @type Array
*/
deps: [],

/**
* Callback to be called,
* when all dependencies are loaded
* to finalize data provided by logic.
*
* Should be overwritten.
*
* @param {Array} results
* @param {Object} params
* @param {Object} options
*
* @returns Array
*/
ready: function(results, params, options) {
return results;
},

/**
* Creates logic instance and calls ready, when all deps are resolved
*
Expand Down

0 comments on commit b980008

Please sign in to comment.