1.0.0 • Published 1 year ago

@kashus24/lotide v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Lotide

A mini clone of the Lodash 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 @kashus24/lotide

Require it:

const _ = require('@kashus24/lotide');

Call it:

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

Documentation

The following functions are currently implemented:

head, - grabs first index tail, - grabs last index middle, - grabs middle one or two in array assertArraysEqual, - Assertion checks if arrays are === assertEqual, - Assertion checks if strings are === assertObjectEqual, - Assertion checks if objects are equal === countLetters, - counts characters countOnly, - counts specific characters eqArrays, - checks if arrays are === eqObjects, - checks if objects are === findKey, - finds a matching key findKeyByValue, - finds a key by given value letterPositions, - returns letter index's map, - callback function applied to each array element takeUntil, - stops list when finds given input without, - returns without given input