Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

es2024.object

WaterLemons2k11MIT1.0.1

Polyfills for the new methods of Object in ES2024.

ecmascript, javascript, polyfill, shim, ES2024, ECMAScript 2024, object, group, groupBy

readme

es2024.object

Polyfills for the new methods of Object in ES2024.

Installation

npm i es2024.object

Usage

import 'es2024.object';

const items = [
  { type: 'number', value: 0 },
  { type: 'number', value: 1 }
];
Object.groupBy(items, ({ type }) => type);
/* {
  number: [
    {
      type: 'number',
      value: 0
    },
    {
      type: 'number',
      value: 1
    }
  ]
} */