Skip to content

WaterLemons2k/es2024.object

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

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
    }
  ]
} */