MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fx_Object_groupBy

Function fx_Object_groupBy

xs/sources/xsObject.c:891–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889}
890
891void fx_Object_groupBy(txMachine* the)
892{
893 txSlot *instance, *at, *property;
894 instance = fxNewInstance(the);
895 mxPullSlot(mxResult);
896 fxGroupBy(the, fx_Object_groupByAux);
897 at = fxNewInstance(the);
898 mxBehaviorOwnKeys(the, instance, XS_EACH_NAME_FLAG | XS_EACH_SYMBOL_FLAG, at);
899 mxPushUndefined();
900 property = the->stack;
901 while ((at = at->next)) {
902 if (mxBehaviorGetOwnProperty(the, instance, at->value.at.id, at->value.at.index, property)) {
903 fxCacheArray(the, property->value.reference);
904 }
905 }
906 mxPop();
907 mxPop();
908}
909
910void fx_Object_hasOwn(txMachine* the)
911{

Callers

nothing calls this directly

Calls 3

fxNewInstanceFunction · 0.85
fxGroupByFunction · 0.85
fxCacheArrayFunction · 0.85

Tested by

no test coverage detected