{"ScriptPreparationCode":null,"TestCases":[{"Name":"yield","Code":"const arr = [];\r\n\r\nfor (let i = 0; i \u003C 100000; i\u002B\u002B) {\r\n const obj = {};\r\n for (let j = 0; j \u003C 10; j\u002B\u002B) {\r\n obj[\u0060prop_${j}\u0060] = j;\r\n }\r\n arr.push(obj);\r\n}\r\n\r\nconst where = function*(isMatch) {\r\n for (let item of this) {\r\n if (isMatch(item)) {\r\n yield item;\r\n }\r\n }\r\n};\r\n\r\nconst select = function*(fn) {\r\n for (let item of this) {\r\n yield fn(item);\r\n }\r\n};\r\n\r\nconst toArray = function() {\r\n return Array.from(this);\r\n};\r\n\r\nconst Generator = Object.getPrototypeOf(function*() {});\r\n\r\nGenerator.prototype.where = where;\r\nArray.prototype.where = where;\r\n\r\nGenerator.prototype.select = select;\r\nArray.prototype.select = select;\r\n\r\nGenerator.prototype.toArray = toArray;\r\nArray.prototype.toArray = toArray;\r\n\r\narr.select((obj) =\u003E obj.prop_3)\r\n .where((num) =\u003E num \u003E 5)\r\n .toArray();","IsDeferred":false},{"Name":"base","Code":"const arr = [];\r\n\r\nfor (let i = 0; i \u003C 100000; i\u002B\u002B) {\r\n const obj = {};\r\n for (let j = 0; j \u003C 10; j\u002B\u002B) {\r\n obj[\u0060prop_${j}\u0060] = j;\r\n }\r\n arr.push(obj);\r\n}\r\n\r\nconst where = function*(isMatch) {\r\n for (let item of this) {\r\n if (isMatch(item)) {\r\n yield item;\r\n }\r\n }\r\n};\r\n\r\nconst select = function*(fn) {\r\n for (let item of this) {\r\n yield fn(item);\r\n }\r\n};\r\n\r\nconst toArray = function() {\r\n return Array.from(this);\r\n};\r\n\r\nconst Generator = Object.getPrototypeOf(function*() {});\r\n\r\nGenerator.prototype.where = where;\r\nArray.prototype.where = where;\r\n\r\nGenerator.prototype.select = select;\r\nArray.prototype.select = select;\r\n\r\nGenerator.prototype.toArray = toArray;\r\nArray.prototype.toArray = toArray;\r\n\r\narr.map((obj) =\u003E obj.prop_3).filter((num) =\u003E num \u003E 5);","IsDeferred":false}]}