# Getting Started

## Installation

You can use the 1loc library in any Javascript application (preferably a node.js environment). Vue, React, Angular, Node.js.&#x20;

* Node.js (>= 14 preferably)

Install the 1loc library using your favorite package manager (yarn or npm).

```
$ yarn add 1loc
```

{% hint style="info" %}
&#x20;Or using NPM&#x20;
{% endhint %}

```bash
$ npm install 1loc
```

## Import and Use Any Method

```javascript
import { makeTallyByProperty } from '1loc'

const myArray = [
    { brand: 'audi', model: 'q8', year: '2019' },
    { brand: 'audi', model: 'rs7', year: '2020' },
    { brand: 'ford', model: 'mustang', year: '2019' },
    { brand: 'ford', model: 'explorer', year: '2020' },
    { brand: 'bmw', model: 'x7', year: '2020' },
]

makeTallyByProperty(myArray, 'brand') // { 'audi': 2, 'ford': 2, 'bmw': 1 }

```

That's it 🎉

## Contribute

You can contribute to this project [here](https://github.com/MartinsOnuoha/1loc-lib).
