isMapLike
Test if a value represents multiple values.
isMapLike(obj)
Return true
if obj
is not a primitive, does not have a falsy value for
@@can.isMapLike
, or alternately implements
@@can.getKeyValue
; false
otherwise.
canReflect.isMapLike(null); // -> false
canReflect.isMapLike(1); // -> false
canReflect.isMapLike("foo"); // -> false
canReflect.isMapLike({}); // -> true
canReflect.isMapLike(function() {}); // -> true
canReflect.isMapLike([]); // -> false
canReflect.isMapLike({ [canSymbol.for("can.isMapLike")]: false }); // -> false
canReflect.isMapLike({ [canSymbol.for("can.getKeyValue")]: null }); // -> false
canReflect.isMapLike(canCompute()); // -> false
canReflect.isMapLike(new DefineMap()); // -> true
Parameters
- obj
{*}
:maybe a Map-like
Returns
{Boolean}
: