@x-oasis/group-by 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-by.cjs.development.js","sources":["../src/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"group-by.cjs.development.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * @param list the collection that the method iterates over.\n * @param fn the function that is invoked for every element in the array.\n * @returns\n */\nfunction groupBy(list: any[], fn: Function) {\n return list.reduce((acc, val) => {\n const key = fn(val);\n acc[key] = acc[key] || [];\n acc[key].push(val);\n return acc;\n }, {});\n}\n\nexport default groupBy;\n"],"names":["groupBy","list","fn","reduce","acc","val","key","push"],"mappings":";;;;AAKA,SAASA,OAAOA,CAACC,IAAW,EAAEC,EAAY;EACxC,OAAOD,IAAI,CAACE,MAAM,CAAC,UAACC,GAAG,EAAEC,GAAG;IAC1B,IAAMC,GAAG,GAAGJ,EAAE,CAACG,GAAG,CAAC;IACnBD,GAAG,CAACE,GAAG,CAAC,GAAGF,GAAG,CAACE,GAAG,CAAC,IAAI,EAAE;IACzBF,GAAG,CAACE,GAAG,CAAC,CAACC,IAAI,CAACF,GAAG,CAAC;IAClB,OAAOD,GAAG;GACX,EAAE,EAAE,CAAC;AACR;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-by.cjs.production.min.js","sources":["../src/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"group-by.cjs.production.min.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * @param list the collection that the method iterates over.\n * @param fn the function that is invoked for every element in the array.\n * @returns\n */\nfunction groupBy(list: any[], fn: Function) {\n return list.reduce((acc, val) => {\n const key = fn(val);\n acc[key] = acc[key] || [];\n acc[key].push(val);\n return acc;\n }, {});\n}\n\nexport default groupBy;\n"],"names":["list","fn","reduce","acc","val","key","push"],"mappings":"oFAKA,SAAiBA,EAAaC,GAC5B,OAAOD,EAAKE,QAAO,SAACC,EAAKC,GACvB,IAAMC,EAAMJ,EAAGG,GAGf,OAFAD,EAAIE,GAAOF,EAAIE,IAAQ,GACvBF,EAAIE,GAAKC,KAAKF,GACPD,IACN"}
|
package/dist/group-by.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-by.esm.js","sources":["../src/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"group-by.esm.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * @param list the collection that the method iterates over.\n * @param fn the function that is invoked for every element in the array.\n * @returns\n */\nfunction groupBy(list: any[], fn: Function) {\n return list.reduce((acc, val) => {\n const key = fn(val);\n acc[key] = acc[key] || [];\n acc[key].push(val);\n return acc;\n }, {});\n}\n\nexport default groupBy;\n"],"names":["groupBy","list","fn","reduce","acc","val","key","push"],"mappings":"AAKA,SAASA,OAAOA,CAACC,IAAW,EAAEC,EAAY;EACxC,OAAOD,IAAI,CAACE,MAAM,CAAC,UAACC,GAAG,EAAEC,GAAG;IAC1B,IAAMC,GAAG,GAAGJ,EAAE,CAACG,GAAG,CAAC;IACnBD,GAAG,CAACE,GAAG,CAAC,GAAGF,GAAG,CAACE,GAAG,CAAC,IAAI,EAAE;IACzBF,GAAG,CAACE,GAAG,CAAC,CAACC,IAAI,CAACF,GAAG,CAAC;IAClB,OAAOD,GAAG;GACX,EAAE,EAAE,CAAC;AACR;;;;"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED