src/ColorHelper.js
function makeStrProtoFn(method) {
		return function () {
			// Convert `arguments` into an array (usually empty or has 1 parameter)
			var args = slice.call(arguments, 0);
			// Add the current string as the first argument
			args.unshift(this);
			return ColorHelper[method].apply(ColorHelper, args);
		};
	}
function makeStrProtoFn(method) {
		return function () {
			// Convert `arguments` into an array (usually empty or has 1 parameter)
			var args = slice.call(arguments, 0);
			// Add the current string as the first argument
			args.unshift(this);
			return ColorHelper[method].apply(ColorHelper, args);
		};
	}
function makeStrProtoFn ( method ) { return function ( ) { // Convert `arguments` into an array (usually empty or has 1 parameter) var args = slice . call ( arguments , 0 ) ; // Add the current string as the first argument args . unshift ( this ) ; return ColorHelper [ method ] . apply ( ColorHelper , args ) ; } ; }
Can't be used inline in the for-loop, because of variable scope.
Otherwise all methods would be pointing to the method as put in
the variable that lives on until after the loop itself.
Can t be used inline in the for - loop because of variable scope . Otherwise all methods would be pointing to the method as put in the variable that lives on until after the loop itself .