# @samma_su/lotide

> This library was published for learning purposes as part of my learnings at Lighthouse Labs.

Latest version **1.0.0** (published 2023-01-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install @samma_su/lotide
pnpm add @samma_su/lotide
yarn add @samma_su/lotide
bun add @samma_su/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 | 2023-01-17 |
| First published | 2023-01-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Samma YuNing Su |
| Maintainers | samma_su |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2023-01-17

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

**Require it:**

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

**Call it:**

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

## Documentation

The following functions are currently implemented:

* `head(arr)`: returns 1 for [1, 2, 3].
* `tail(arr)`: returns 2, 3 for [1, 2, 3].
* `middle(arr)`: returns [] for [1] or [1, 2]; [2] for [1, 2, 3]; [2, 3] for 
*                  [1, 2, 3, 4].
* `assertArraysEqual(actual, expected)`: test function for eqArrays.
* `assertEqual(actual, expected)`: test function for functions with primitive 
*                                  values as output.
* `assertObjectsEqual(actual, expected)`: test function for eqObject.
* `countLetters(str)`: returns the count of each letter in the string.
* `countOnly(allItems, itemsToCount)`: returns the count of item(s) in allItems,
*                                      specified in itemsToCount. Returns 
*                                      unidentified if item not specified.
* `eqArrays(arr1, arr2)`: compares two arrays and return true or false.
* `eqObject(obj1, obj2)`: compares two objects and return true or false.
* `findKey(obj, callback)`: returns key based on the condition specified by
*                           the callback function.
* `findKeyByValue(obj, value)`: returns key of input value.
* `letterPositions(str)`: returns the indices of each letter in the string.
* `map(array, callback)`: returns a new array with results from the callback on 
*                         every element in the calling array.
* `takeUntil(array, callback)`: returns a new array with values taken 
*                               incrementally from the calling array until
*                               condition specified by the callback is met.
* `without(source, itemsToRemove)`: returns a new array with all elements from 
*                                   the source input expect element specified by
*                                   itemsToRemove.

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