Validation API

isMap()

Validates that the passed arguments are of type Map.

  • Accepts any arguments.
  • Returns true if all provided arguments pass the validation, otherwise, returns false.
Example:
isMap(new Map([['a', 1], ['b', 2], ['c', 3]]));
isMap(new Map([['a', 1], ['b', 2]]), new Map([['c', 3], ['d', 4]]));
// true

isMap(null);
isMap({});
isMap(new Map([['a', 1], ['b', 2]]), []);
// false