# @xinyuchen/lotide

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

Latest version **1.0.0** (published 2022-01-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install @xinyuchen/lotide
pnpm add @xinyuchen/lotide
yarn add @xinyuchen/lotide
bun add @xinyuchen/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.0 |
| Published | 2022-01-18 |
| First published | 2022-01-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 22.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Xinyu Chen |
| Maintainers | xinyuchen |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2022-01-18

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

**Require it:**

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

**Call it:**

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

## Documentation

The following functions are currently implemented:

* `assertArraysEqual(array1, array2)`: Check if two arrays are equal, show the result on terminal.  
* `assertEqual(actual, expected)`: Check if two primitive type elements are equal, show the result on terminal.  
* `assertObjectsEqual(object1, object2)`: Check if two objects are equal, show the result on terminal. 
* `countOnly(allItems, itemsToCOunt)`: Count the number of an element in allItems based on itemsToCount object. 
* `eqArrays(array1, array2)`: Check if two arrays are equal, return boolean values. 
* `eqObjects(object1, object2)`: Check if two objects are equal, return boolean values. 
* `findKey(object, callback)`: Return the first key that callback(value) returns true, return undefined if no elements match callback requirements. 
* `findKeyByValue(object, value)`: Return the first key that has the specific value, return undefined if no elements match the value provided. 
* `head(list)`: Return the first element of the array. 
* `letterPosition(sentence)`: Return an object containing all letters appeared in the sentence and their indexes in the sentence as values. 
* `map(array, callback)`: Apply callback on each element of the array. 
* `middle(array)`: Return the median of elements in the array. 
* `tail(list)`: Return all elements of the array except the head. 
* `takeUntil(array, callback)`: Return all elements before callback evaluates to true. 
* `without(source, itemsToRemove)`: Remove itemsToRemove from source.

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