index.js
function makePromise(fn) {
	return function() {
		var args = Array.prototype.slice.call(arguments);
		if (hasCallback(args)) {
			// argument list has callback, so call method with callback
			return callCallback(fn, args);
		} else {
			// no callback, call method with promises
			return callPromise(fn, args);
		}
	}
}
function makePromise(fn) {
	return function() {
		var args = Array.prototype.slice.call(arguments);
		if (hasCallback(args)) {
			// argument list has callback, so call method with callback
			return callCallback(fn, args);
		} else {
			// no callback, call method with promises
			return callPromise(fn, args);
		}
	}
}
function makePromise ( fn ) { return function ( ) { var args = Array . prototype . slice . call ( arguments ) ; if ( hasCallback ( args ) ) { // argument list has callback, so call method with callback return callCallback ( fn , args ) ; } else { // no callback, call method with promises return callPromise ( fn , args ) ; } } }
Wrap method to handle both callbacks and promises
Wrap method to handle both callbacks and promises