# @leeseancw/lotide

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

Latest version **1.0.1** (published 2022-08-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install @leeseancw/lotide
pnpm add @leeseancw/lotide
yarn add @leeseancw/lotide
bun add @leeseancw/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 | 2022-08-29 |
| First published | 2022-08-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 26.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sean Lee |
| Maintainers | leeseancw |

## Links

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

## Recent versions

- 1.0.1 (latest) — 2022-08-29
- 1.0.0 — 2022-08-29

## 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 @leeseancw/lotide`

**Require it:**

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

**Call it:**

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

## Documentation

The following functions are currently implemented:

* `assertArraysEqual(arr1, arr2)`: assertion function that compares 2 arrays
* `assertEqual(actual, expected)`: assertion function that compares 2 primitives
* `assertObjectsEqual(obj1, obj2)`: assertion function that compares 2 objects (which are not arrays)
* `countLetters(sentence)`: function that takes in a string and catalogues each instance of each unique character
* `countOnly(allItems, itemsToCount)`: function that counts for specific elements listed in itemsToCount in allItems
* `eqArrays(arr1, arr2)`: function that checks if 2 arrays are absolutely identical
* `eqObjects(object1, object2)`: function that checks if 2 objects (not arrays) are absolutely identical
* `findKey(object, callback)`: function that scans the object and return the first key for which the callback returns a truthy value.
* `findKeyByValue(obj, val)`: function that takes in an object and a value. It should scan the object and return the first key which contains the given value. 
* `flatten(arr)`: a duplicate function of the built-in .flat()
* `head(arr)`: function that returns the first element of an array
* `letterPosition(sentence)`: functoin that returns all the indices (zero-based positions) in the string where each character is found.
* `map(array, callback)`: a duplicate function of the built-in .map()
* `middle(arr)`: function that takes an array and returns the middle (or 2 middle) value in an array
* `tail(arr)`: function that returns an array without the first element
* `takeUntil(array, callback)`: function that takes an array and returns a new array with elements up to when the callback function returns truthy
* `without(source, itemsToRemove)`: a similar function to the built-in .filter()

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