actions.orb.jsdoc

/**
 * @module actions
 * @description Module contains orbx actions allowing an interactions between prototype and children
 */

/**
 * @function
 * @name coldFn
 * @description Take function and attache it to current object binding it. Executing function will change only the object and not its child. Other words if you call this function from child it will change prototype object value
 * @example
 * const test = Object.create(actions);
 * test.value = 0;
 * test.coldFn(function add(){ this.value++ });
 * test.add(); // test.value === 1;
 * const test2 = Object.create(test);
 * test2.add() // test2.value === undefined && test.value === 2
 * @param {Function} fn callback function that will be set by given name
 * @param {String} name function name if function is anonymus
 * @return {Void}
 * @public
 */

/**
 * @function
 * @name hotFn
 * @description Take function and attache it to current object checking if existing name exists on prototype chain
 * @example
 * const test = Object.create(actions);
 * test.value = 0;
 * test.hotFn(function add(){ this.value++ });
 * const test2 = Object.create(test);
 * test2.value = 0;
 * test.add() // test.value === 1 && test2.value === 0
 * test2.add() // test.value === 1 && test2.value === 1
 * @param {Function} fn callback function that will be set by given name
 * @param {String} name function name if function is anonymus
 * @return {Void}
 * @public
 */