# @moh_diab/lotide

> lotide

Latest version **1.0.0** (published 2021-12-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install @moh_diab/lotide
pnpm add @moh_diab/lotide
yarn add @moh_diab/lotide
bun add @moh_diab/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 | 2021-12-03 |
| First published | 2021-12-03 |
| 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 | Mohamed Diab |
| Maintainers | moh_diab |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2021-12-03

## 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 @moh_diab/lotide`

**Require it:**

`const _ = require('@moh_diab/lotide');`

**Call it:**

`const results = _.tail([1, 2, 3]) // => [2, 3]`

## Documentation

The following functions are currently implemented:

* `function head(arr)`: A function that returns the first element from an array.
* `function tail(arr)`: A function that returns every element except the head of an array.
* `function middle(arr)`: A function that returns an array with only the middle element(s) of an array. 
* `function countOnly(allItems,ItemsToCount)`: A function that takes in an array of strings and returns an object with the appropriate counts.
* `function countLetters(string)`: A function that takes in a sentence (as a string) and returns a count of each letter of the sentence.
* `function letterPositions(string)`: A function that returns all the indices in a string where each character is found.
* `function eqObjects(Object1,Object2)`: A function that takes in two objects and returns true or false, based on a perfect match.
* `function assertObjectsEqual(..)`: A function that takes in two objects and console.log an appropriate message to the console.
* `function map(array,callback)`: A function that takes in two arguments and returns a new array based on the results of the callback function.
* `function takeUntil(arr,callback)`: A function that takes in an array and a Callback, returns a slice of the array taken from the beginning until the callback function returns a truthy value.

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