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.
This project was created and published by me as part of my learnings at Lighthouse Labs.
Install it:
npm install @jeromealmir/lotide
Require it:
const _ = require('@jeromealmir/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
The following functions are currently implemented:
assertArraysEqual
: function that compares two arrays and log a message if they are a perfect matchassertEqual
: function that compares two primitive values and log a message if they are a perfect matchassertObjectsEqual
: function that compares two objects and log a message if they are a perfect matchcountLetters
: function that returns a list and count of each letters of a stringcountOnly
: function that counts the specified subset of an itemseqArrays
: function that compares two arrays and return true if they are a perfect matcheqObjects
: function that compares two objects and return true if they are a perfect matchfindKey
: function that returns the first key that meets the criteria specified by a callbackfindKeyByValue
: function that returns the key that matches the search valueflatten
: function that combines an array of arrays into a single-level arrayhead
: function that returns only the first element of the arrayletterPositions
: function that returns the index of all letters of a stringmap
: function that returns a new array populated with modified elements by a callbackmiddle
: function that returns the middle most element of the arraytail
: function that returns everything except the first element (head) of the arraytakeUntil
: function that returns a slice of the array based on the criteria specified by a callbackwithout
: function that removes an item from an array