Skip to content
/ keyby Public

A typescript implementation of keyby method, inspired by lodash.keyby

License

Notifications You must be signed in to change notification settings

cloudacy/keyby

Repository files navigation

keyby

A typescript implementation of keyby method, inspired by lodash.keyby

Usage

const arr = [
  { id: 3, name: "Hello" },
  { id: 5, name: "World" },
  { id: 1, name: "keyby" },
];

const keyedArray = keyBy(array, "id");

console.log(keyedArray);
// => {3: {id: 3, name: "Hello"}, 5: {id: 5, name: "World"}, 1: {id: 1, name: "keyby"}}

About

A typescript implementation of keyby method, inspired by lodash.keyby

Resources

License

Stars

Watchers

Forks

Packages

No packages published