{"ScriptPreparationCode":"// Imports\r\n_.noConflict();\r\n\r\n// Define functions to create data\r\nconst generateRandomStr = function(len){\r\n \treturn [...Array(len)].map(i=\u003E(~~(Math.random()*36)).toString(36)).join(\u0027\u0027);\r\n}\r\n\r\n// Define ES6 Equivalents\r\nvar groupBy = function(xs, key) {\r\n return xs.reduce(function(rv, x) {\r\n (rv[x[key]] = rv[x[key]] || []).push(x);\r\n return rv;\r\n }, {});\r\n};\r\n\r\n// Create dataset to be operated on\r\nconst DATASET_LENGTH = 1000000;\r\nvar dataset = [...Array(DATASET_LENGTH)].map(_=\u003EMath.ceil(Math.random()*40));\r\n\r\ndataset = dataset.map(v =\u003E {\r\n\treturn generateRandomStr(v);\r\n});","TestCases":[{"Name":"Lodash GroupBy","Code":"_.groupBy(dataset, \u0027length\u0027)","IsDeferred":false},{"Name":"ES6 GroupBy","Code":"groupBy(dataset, \u0027length\u0027)","IsDeferred":false}]}