eachKey
Iterate over a MapLike, calling callback on each enumerable property
eachKey(obj, callback, context)
Iterate all own enumerable properties on Map-like obj
(using [can-reflect/shape/getOwnEnumerableKeys canReflect.getOwnEnumerableKeys]), and call
callback with the property value, the property key, and obj, and optionally setting
this on the callback as context if provided, obj otherwise.
var foo = new DefineMap({ bar: "baz" });
canReflect.eachKey(foo, console.log, console); // logs 'baz bar {foo}'
Parameters
- obj
{Object}:The object to iterate over
- callback
{function(*, String)}:The callback to call on each enumerable property value
- context
{[}:an optional
thiscontext for callingcallback
Returns
{Array}:
the enumerable keys of obj as an Array