lib/ambush.js
function run(id, parameter, callback) {
	if (!_isValidId(id)) {
		return false;
	}

	if (callback && typeof(callback) !== 'function') {
		logger('AMBUSH_NO_CALLBACK');
	}

	const index = _getIndexOfId(id);

	if (index > -1) {
		goblin.ambush[index].action(parameter, callback);
	} else {
		logger('AMBUSH_INVALID_REFERENCE');
	}
}
function run(id, parameter, callback) {
	if (!_isValidId(id)) {
		return false;
	}

	if (callback && typeof(callback) !== 'function') {
		logger('AMBUSH_NO_CALLBACK');
	}

	const index = _getIndexOfId(id);

	if (index > -1) {
		goblin.ambush[index].action(parameter, callback);
	} else {
		logger('AMBUSH_INVALID_REFERENCE');
	}
}
function run ( id , parameter , callback ) { if ( ! _isValidId ( id ) ) { return false ; } if ( callback && typeof ( callback ) !== 'function' ) { logger ( 'AMBUSH_NO_CALLBACK' ) ; } const index = _getIndexOfId ( id ) ; if ( index > - 1 ) { goblin . ambush [ index ] . action ( parameter , callback ) ; } else { logger ( 'AMBUSH_INVALID_REFERENCE' ) ; } }
Run an ambush function action.

@param {string} id Ambush function id.
@param {any} parameter First parameter for the ambush function action.
@param {function} callback Second parameter for the ambush function action.
@returns {array} Ids of the ambush functions of that category.
Run an ambush function action .