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 @mahe045/lotide
Require it:
const _ = require('@mahe045/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
The following functions are currently implemented:
function1(head): A commonly used function for arrays is to retrieve the first element from the array. This is often referred to as the "head" of the array.function2(tail): The tail is not the last element of the array. The tail is meant to be every element except the head (first element) of the array.function3(middle): take in an array and return the middle-most element(s) of the given array.function4(assertArraysEqual): if arrays when comapred are equal or not equal to one anotherfunction5(assertEqual): if strings and numbers when compared are or are not equal to each otherfunction6(assertObjectsEqual): if objects are or are not equal to each otherfunction7(countOnly): counts only specfic strings in an arrayfunction8(eqArrays): comapres if arrays are equal to one anotherfunction9(eqObjects): comapares if objects are equal to one anotherfunction10(findKey): find a specfic key in a functionfunction11(countLetters): like countOnly, counts specfic lettersfunction12(findKeyByValue): search for a key on an object where its value matches a given value.function13(letterPositions): which will return all the indices (zero-based positions) in the string where each character is found.function14(takeUntil): takes in values in a function until it returns falsefunction15(without): creates an array excluding, for comparison