# @dimontejulia/lotide

> implementing the lodash library manually

Latest version **1.0.1** (published 2020-11-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install @dimontejulia/lotide
pnpm add @dimontejulia/lotide
yarn add @dimontejulia/lotide
bun add @dimontejulia/lotide
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-11-02 |
| First published | 2020-11-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 17.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | @dimontejulia |
| Maintainers | dimontejulia |

## Links

- npm: https://www.npmjs.com/package/@dimontejulia/lotide
- Repository: https://github.com/dimontejulia/lotide
- Homepage: https://github.com/dimontejulia/lotide#readme
- Issues: https://github.com/dimontejulia/lotide/issues
- npm.io page: https://npm.io/package/@dimontejulia/lotide

## Recent versions

- 1.0.1 (latest) — 2020-11-02
- 1.0.0 — 2020-11-02

## README

# Lotide

A mini clone of the [Lodash](https://lodash.com) library.

## Purpose

**_BEWARE:_ This library was published for learning purposes. It is _not_ intended for use in production-grade software.**

This project was created and published by me as part of my learnings at Lighthouse Labs.

## Usage

**Install it:**

`npm install @dimontejulia/lotide`

**Require it:**

`const _ = require('@dimontejulia/lotide');`

**Call it:**

`const results = _.tail([1, 2, 3]) // => [2, 3]`

## Documentation

The following functions are currently implemented:

- `assertArraysEqual`: Prints if two arrays are equal
- `assertEqual`: Prints if two values are equal
- `assertObjectsEqual`: Prints if 2 objects are equal
- `countLetters`: Returns an object with the count of each letter.
- `countOnly`: Count how many times a value appears in an object
- `eqArrays`: Validates if two arrays are equal
- `eqObjects`: Validates if two objects are equal
- `findKey`: takes in an object and a callback and scans the object and returns the first key for which the callback returns a truthy value.
- `findKeyByValue`: Returns the key when provided with it's value
- `flatten`: Given an array or an array of arrays, returns all extracted values in 1 array
- `head`: returns the head (first element) of an array
- `index`: requires all necessary functions and loads them into an object
- `letterPositions`: returns an object with the indexes where each letter shows up in a string
- `map`: The map function will return a new array based on the results of the callback function.
- `middle`: returns the middle element of an array. If there are 2, return both

Testing:

- test files that implement Mocha & Chai to run tests on the above mentioned functions.

---
_Source: https://npm.io/package/@dimontejulia/lotide · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
