"use strict";

var isArguments = require("lodash.isarguments");
var actualMessageValues = require("../actual-message-values");

module.exports = function(referee) {
    function isArrayLike(object) {
        return (
            Array.isArray(object) ||
            (Boolean(object) &&
                typeof object.length === "number" &&
                typeof object.splice === "function") ||
            isArguments(object)
        );
    }

    referee.add("isArrayLike", {
        assert: function(actual) {
            return isArrayLike(actual);
        },
        assertMessage: "${customMessage}Expected ${actual} to be array like",
        refuteMessage:
            "${customMessage}Expected ${actual} not to be array like",
        expectation: "toBeArrayLike",
        values: actualMessageValues
    });
};

"use strict";

var isArguments = require("lodash.isarguments");
var actualMessageValues = require("../actual-message-values");

module.exports = function(referee) {
    function isArrayLike(object) {
        return (
            Array.isArray(object) ||
            (Boolean(object) &&
                typeof object.length === "number" &&
                typeof object.splice === "function") ||
            isArguments(object)
        );
    }

    referee.isArrayLike = isArrayLike;

    referee.add("isArrayLike", {
        assert: function(actual) {
            return isArrayLike(actual);
        },
        assertMessage: "${customMessage}Expected ${actual} to be array like",
        refuteMessage:
            "${customMessage}Expected ${actual} not to be array like",
        expectation: "toBeArrayLike",
        values: actualMessageValues
    });
};

--- 
+++ 
@@ -14,6 +14,8 @@
         );
     }
 
+    referee.isArrayLike = isArrayLike;
+
     referee.add("isArrayLike", {
         assert: function(actual) {
             return isArrayLike(actual);
Remove referee.isArrayLike from public API

This is not used by referee itself
