A mini clone of the Lodash library.
BEWARE: This library was published for learning purposes. It is not intended for use in production-grade software.
^^ read that again.
This project was created and published by me as part of my learnings at Lighthouse Labs.
Install it:
npm install @KagisoMashigo/lotide
Require it:
const _ = require('@KagisoMashigo/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
The following functions are currently implemented along with their corresopnding test files:
head(...)
: returns first value of an arraymiddle(...)
: returns middle value of an arraytail(...)
: returns end value of an arrayflatten(...)
: merges nested arraysletterPositions(...)
: returns the positions of a particular letter in a stringmap(...)
: returns first character of strings in an arraymergeArrays(...)
: returns merged arraystakeUntil(...)
: stores values in an object as specifiedwithout(...)
: returns an array without particular elementscountOnly(...)
: counts specific values and stores in an objectcountLetters(...)
: counts the occurance of a char and adds value to objectfindKey(...)
: finds key in an objects based on requirementsfindKeyByValue(...)
: finds value of the aforementioned function