Skip to content

MatijaNovosel/matija-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

75 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

matija-utils

My opinionated list of JavaScript utilities.

Install with your package manager of choice:

$ yarn add matija-utils
$ npm i matija-utils

Check out the documentation here.

Import the functions you need:

import { range, groupBy } from "matija-utils";

for (const n of range(0, 5)) {
  console.log(n); // 0, 1, 2, 3, 4
}

const x = [
  {
    name: "Ivan",
    company: "Google"
  },
  {
    name: "Kenny",
    company: "Google"
  },
  {
    name: "Joseph",
    company: "Amazon"
  }
];

groupBy(x, "company"); // {"Google":[{"name":"Ivan","company":"Google"},{"name":"Kenny","company":"Google"}],"Amazon":[{"name":"Joseph","company":"Amazon"}]}

And that's all there is to it!

๐Ÿš€ Features

  • Small package size
  • A multitude of useful utilities
  • Fully documented and typed