# @benfinlay/lotide

> A mini clone of the Lodash library. This library was created for learning purposes.

Latest version **1.0.0** (published 2022-04-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install @benfinlay/lotide
pnpm add @benfinlay/lotide
yarn add @benfinlay/lotide
bun add @benfinlay/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-04-11 |
| First published | 2022-04-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 83 |
| Unpacked size | 13.1 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ben Finlay |
| Maintainers | benfinlay |

## Links

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

## Dependencies (83)

- [he](https://npm.io/package/he.md) ^1.2.0
- [ms](https://npm.io/package/ms.md) ^2.1.3
- [diff](https://npm.io/package/diff.md) ^5.0.0
- [flat](https://npm.io/package/flat.md) ^5.0.2
- [glob](https://npm.io/package/glob.md) ^7.2.0
- [once](https://npm.io/package/once.md) ^1.4.0
- [y18n](https://npm.io/package/y18n.md) ^5.0.8
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [cliui](https://npm.io/package/cliui.md) ^7.0.4
- [debug](https://npm.io/package/debug.md) ^4.3.3
- [growl](https://npm.io/package/growl.md) ^1.10.5
- [isexe](https://npm.io/package/isexe.md) ^2.0.0
- [loupe](https://npm.io/package/loupe.md) ^2.3.4
- [which](https://npm.io/package/which.md) ^2.0.2
- [yargs](https://npm.io/package/yargs.md) ^16.2.0
- [braces](https://npm.io/package/braces.md) ^3.0.2
- [nanoid](https://npm.io/package/nanoid.md) ^3.3.1
- [wrappy](https://npm.io/package/wrappy.md) ^1.0.2
- [find-up](https://npm.io/package/find-up.md) ^5.0.0
- [is-glob](https://npm.io/package/is-glob.md) ^4.0.3
- [js-yaml](https://npm.io/package/js-yaml.md) ^4.1.0
- [p-limit](https://npm.io/package/p-limit.md) ^3.1.0
- [pathval](https://npm.io/package/pathval.md) ^1.1.1
- [anymatch](https://npm.io/package/anymatch.md) ^3.1.2
- [argparse](https://npm.io/package/argparse.md) ^2.0.1
- [chokidar](https://npm.io/package/chokidar.md) ^3.5.3
- [deep-eql](https://npm.io/package/deep-eql.md) ^3.0.1
- [escalade](https://npm.io/package/escalade.md) ^3.1.1
- [fsevents](https://npm.io/package/fsevents.md) ^2.3.2
- [has-flag](https://npm.io/package/has-flag.md) ^4.0.0
- [inflight](https://npm.io/package/inflight.md) ^1.0.6
- [inherits](https://npm.io/package/inherits.md) ^2.0.4
- [p-locate](https://npm.io/package/p-locate.md) ^5.0.0
- [readdirp](https://npm.io/package/readdirp.md) ^3.6.0
- [camelcase](https://npm.io/package/camelcase.md) ^6.3.0
- [is-number](https://npm.io/package/is-number.md) ^7.0.0
- [minimatch](https://npm.io/package/minimatch.md) ^4.2.1
- [picomatch](https://npm.io/package/picomatch.md) ^2.3.1
- [wrap-ansi](https://npm.io/package/wrap-ansi.md) ^7.0.0
- [ansi-regex](https://npm.io/package/ansi-regex.md) ^5.0.1
- [color-name](https://npm.io/package/color-name.md) ^1.1.4
- [concat-map](https://npm.io/package/concat-map.md) ^0.0.1
- [decamelize](https://npm.io/package/decamelize.md) ^4.0.0
- [fill-range](https://npm.io/package/fill-range.md) ^7.0.1
- [is-extglob](https://npm.io/package/is-extglob.md) ^2.1.1
- [strip-ansi](https://npm.io/package/strip-ansi.md) ^6.0.1
- [workerpool](https://npm.io/package/workerpool.md) ^6.2.0
- [ansi-colors](https://npm.io/package/ansi-colors.md) ^4.1.1
- [ansi-styles](https://npm.io/package/ansi-styles.md) ^4.3.0
- [check-error](https://npm.io/package/check-error.md) ^1.0.2
- [emoji-regex](https://npm.io/package/emoji-regex.md) ^8.0.0
- [fs.realpath](https://npm.io/package/fs.realpath.md) ^1.0.0
- [glob-parent](https://npm.io/package/glob-parent.md) ^5.1.2
- [locate-path](https://npm.io/package/locate-path.md) ^6.0.0
- [log-symbols](https://npm.io/package/log-symbols.md) ^4.1.0
- [path-exists](https://npm.io/package/path-exists.md) ^4.0.0
- [randombytes](https://npm.io/package/randombytes.md) ^2.1.0
- [safe-buffer](https://npm.io/package/safe-buffer.md) ^5.2.1
- [type-detect](https://npm.io/package/type-detect.md) ^4.0.8
- [yocto-queue](https://npm.io/package/yocto-queue.md) ^0.1.0
- [is-plain-obj](https://npm.io/package/is-plain-obj.md) ^2.1.0
- [string-width](https://npm.io/package/string-width.md) ^4.2.3
- [yargs-parser](https://npm.io/package/yargs-parser.md) ^20.2.4
- [color-convert](https://npm.io/package/color-convert.md) ^2.0.1
- [get-func-name](https://npm.io/package/get-func-name.md) ^2.0.0
- [balanced-match](https://npm.io/package/balanced-match.md) ^1.0.2
- [browser-stdout](https://npm.io/package/browser-stdout.md) ^1.3.1
- [is-binary-path](https://npm.io/package/is-binary-path.md) ^2.1.0
- [normalize-path](https://npm.io/package/normalize-path.md) ^3.0.0
- [supports-color](https://npm.io/package/supports-color.md) ^8.1.1
- [to-regex-range](https://npm.io/package/to-regex-range.md) ^5.0.1
- [yargs-unparser](https://npm.io/package/yargs-unparser.md) ^2.0.0
- [assertion-error](https://npm.io/package/assertion-error.md) ^1.1.0
- [brace-expansion](https://npm.io/package/brace-expansion.md) ^1.1.11
- [get-caller-file](https://npm.io/package/get-caller-file.md) ^2.0.5
- [path-is-absolute](https://npm.io/package/path-is-absolute.md) ^1.0.1
- [binary-extensions](https://npm.io/package/binary-extensions.md) ^2.2.0
- [require-directory](https://npm.io/package/require-directory.md) ^2.1.1
- [strip-json-comments](https://npm.io/package/strip-json-comments.md) ^3.1.1
- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^4.0.0
- [is-unicode-supported](https://npm.io/package/is-unicode-supported.md) ^0.1.0
- [serialize-javascript](https://npm.io/package/serialize-javascript.md) ^6.0.0
- [is-fullwidth-code-point](https://npm.io/package/is-fullwidth-code-point.md) ^3.0.0

## Recent versions

- 1.0.0 (latest) — 2022-04-11

## 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 Ben Finlay as part of my learnings at Lighthouse Labs. 

## Usage

**Install it:**

`npm install @benfinlay/lotide`

**Require it:**

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

**Call it:**

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

## Documentation

The following functions are currently implemented:


* `head(array)`: returns the first entry in an array.
* `tail(array)`: returns an array with the first entry of the input array removed.
* `middle(array)`: returns and array with the middle values the input array.
* `countLetters(string)`: returns a count of all letters in a string.
* `countOnly(allItems, itemsToCount)`: takes in a collection of items and returns counts for a specific subset of those items. 
* `eqArrays(arr1, arr2)`: compares two arrays to check if they are the same.
* `eqObjects(object1, object2)`: compares two objects to check if they are the same.
* `findKey(obj, callback)`: takes in an object and callback. Scans the object and returns the first key for which the callback returns a truthy value.
* `findKeyByValue(obj, val)`: searches for a corresponding value, and returns the associated object key.
* `flatten(array)`: takes in an array with nested arrays, and returns a single array with all values.
* `letterPositions(string)`: takes in a string and returns an object with the keys as chars, and the values as the positions of the letters in the string.
* `map(array, callback)`: takes in an array and callback and return a new array based on the results of the callback function.
* `takeUntil(array, callback)`: returns a slice of an array starting from array[0], and stopping at when the callback value reaches a truthy position.
* `without(source, itemsToRemove)`: takes in two arrays, and removes any of values in the source array that appear in the itemsToRemove array.

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