1.0.0 • Published 3 years ago
@hanisiddiqui/lotide v1.0.0
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 @hanisiddiqui/lotide
Require it:
const _ = require('@hanisiddiqui/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(...)
: checks if two arrays are equalassertEqual(...)
: checks if two values are equalassertObjectsEqual(...)
: checks if two objects are equalcountLetters(...)
: counts the number of times each letter in a sentence is usedcountOnly(...)
: counts the number of times a name is usedeqArrays(...)
: checks if two arrays are equaleqObjects(...)
: checks if two objects are equalfindKey(...)
: returns key for a specific valuefindKeyByValue(...)
: returns key for a specific valuehead(...)
: returns first element of arraytail(...)
: returns last element of arraymap(...)
: returns first letter of each stringindexPositions(...)
: returns index of each valuemiddle(...)
: returns middle element(s)takeUntil(...)
: returns array until certain valuewithout(...)
: returns array without specific element
1.0.0
3 years ago