Ad
  • Custom User Avatar

    Arrays are Objects ( almost everything is an object ).

    I suppose by

    string, boolean, number or object

    you mean it cannot be an array.

    I would make this explicit.

    In JavaScript, arrays function more or less as objects with numerical properties ([ "zero", "one" ] ~ { 0: "zero", 1: "one" }), so it would not even make it harder for the user to allow arrays as well. But you don't have to.

  • Custom User Avatar

    null is an Object. Expected results should be specified, and it should be tested with.

  • Custom User Avatar

    Also, where are the random tests?