jamon.js
function callNodeMethod(targets, subjects, method, returnTargets) {
		targets.forEach(target => {
			const subject = targets.indexOf(target) ? clone(subjects, true) : subjects;
			
			if (isIterable(subjects)) {
				target[method](...subject);
			} else {
				target[method](subject);
			}
			
			normalize(target);
		});
		
		return returnTargets ? targets : subjects;
	}
function callNodeMethod(targets, subjects, method, returnTargets) {
		targets.forEach(target => {
			const subject = targets.indexOf(target) ? clone(subjects, true) : subjects;
			
			if (isIterable(subjects)) {
				target[method](...subject);
			} else {
				target[method](subject);
			}
			
			normalize(target);
		});
		
		return returnTargets ? targets : subjects;
	}
function callNodeMethod ( targets , subjects , method , returnTargets ) { targets . forEach ( target => { const subject = targets . indexOf ( target ) ? clone ( subjects , true ) : subjects ; if ( isIterable ( subjects ) ) { target [ method ] ( ... subject ) ; } else { target [ method ] ( subject ) ; } normalize ( target ) ; } ) ; return returnTargets ? targets : subjects ; }
Call node methods on multiple targets and with multiple subjects
@private
@param {Jamon} targets
@param {Jamon} subjects
@param {string} method - node method to call
@param {boolean} returnTargets - return the targets?
@return {Jamon}
@todo jamonize both targets and subjects if needed
Call node methods on multiple targets and with multiple subjects