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 @SJ-WJ/lotide
Require it:
const _ = require('@SJ-WJ/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
The following functions are currently implemented:
assertArraysEqual
: Asserts array functions determining if they match or notassertEqual
: Asserts values determining if they match or notassertObjectsEqual
: Asserts objects determining if they match or notcountLetters
: Counts each letter and each instance the letter is presentcountOnly
: Counts a specifed amounteqArrays
: Compares arrayseqObjects
: Compares objectsfindKey
: Returns value of key once the callback returns a truthy valuefindKeyByValue
: Returns the key if the values matchhead
: Returns the first element of an arrayindex
: List of all functions used in lotideletterPositions
: Returns the indices of each lettermap
: Creates a new arraymiddle
: Returns the middle elements of an arraytail
: Returns all elements of the array except the first onetakeUntil
: Returns array from first index up until stated pointwithout
: Removes elements from arrays