"use strict";

module.exports = function(referee) {
    referee.add("isFunction", {
        assert: function(actual) {
            return typeof actual === "function";
        },
        assertMessage:
            "${customMessage}${actual} (${actualType}) expected to be function",
        refuteMessage: "${customMessage}${actual} expected not to be function",
        expectation: "toBeFunction",
        values: function(actual, message) {
            return {
                actual: String(actual).replace("\n", ""),
                actualType: typeof actual,
                customMessage: message
            };
        }
    });
};

"use strict";

module.exports = function(referee) {
    referee.add("isFunction", {
        assert: function(actual) {
            return typeof actual === "function";
        },
        assertMessage:
            "${customMessage}${actual} (${actualType}) expected to be function",
        refuteMessage: "${customMessage}${actual} expected not to be function",
        expectation: "toBeFunction",
        values: function(actual, message) {
            return {
                actual: String(actual)
                    .replace("function(", "function (")
                    .replace("\n", ""),
                actualType: typeof actual,
                customMessage: message
            };
        }
    });
};

Fix isFunction failure message differences
Fix isFunction failure message differences

The toString representation of functions has changed slightly between
Node 8 and Node 10. Node 10 retains the original whitespace between
the function keyword and the opening braces while Node 8 always inserts
a blank.
