[JSC] Clean up Object.entries implementation