build/browser/index.js
/**
     * Constructs a function that can apply the operator to objects that implement the operator as a method.
     * Falls back to the primitive function when the argument is a number.
     * @hidden
     */
Constructs a function that can apply the operator to objects that implement the operator as a method.
Falls back to the primitive function when the argument is a number.
@hidden
Constructs a function that can apply the operator to objects that implement the operator as a method . Falls back to the primitive function when the argument is a number . @hidden
function makeUnaryUniversalFunction(methodName, primitiveFunction) {
        return function (x) {
            if (isCallableMethod(x, methodName)) {
                return x[methodName]();
            }
            else if (typeof x === 'number') {
                return primitiveFunction(x);
            }
            else {
                throw new TypeError("x must support " + methodName + "(x)");
            }
        };
    }
function makeUnaryUniversalFunction ( methodName , primitiveFunction ) { return function ( x ) { if ( isCallableMethod ( x , methodName ) ) { return x [ methodName ] ( ) ; } else if ( typeof x === 'number' ) { return primitiveFunction ( x ) ; } else { throw new TypeError ( "x must support " + methodName + "(x)" ) ; } } ; }
Constructs a function that can apply the operator to objects that implement the operator as a method.
Constructs a function that can apply the operator to objects that implement the operator as a method .