isValueLike
Test if a value represents a single value (as opposed to several values).
isValueLike(obj)
Return true
if obj
is a primitive or implements @can.getValue
,
false
otherwise.
canReflect.isValueLike(null); // -> true
canReflect.isValueLike({}); // -> false
canReflect.isValueLike(function() {}); // -> false
canReflect.isValueLike({ [canSymbol.for("can.isValueLike")]: true}); // -> true
canReflect.isValueLike({ [canSymbol.for("can.getValue")]: function() {} }); // -> true
canReflect.isValueLike(canCompute()); // -> true
canReflect.isValueLike(new DefineMap()); // -> false
Parameters
- obj
{*}
:maybe a primitive or an object that yields a value
Returns
{Boolean}
: