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 @loloffs/lotide
Require it:
const _ = require('@loloffs/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
The following functions are currently implemented:
function1(assertEqual)
: asserts if two values are equal (===) or notfunction2(eqArrays)
: return true if two arrays are equal and false if notfunction3(assertArraysEqual)
: same as eqArrays but with added pass/fail commentsfunction4(eqObjects)
: return true if two objects are equal and false if notfunction5(assertObjectsEqual)
: same as eqObjects but with added pass/fail commentsfunction6(countLetters)
: counts how many letters are in a given stringfunction7(findKeyByValue)
: find key in object by valuefunction8(findKey)
: find key in object by valuefunction9(head)
: returns first value in an arrayfunction10(tail)
: returns all values in array except the first valuefunction11(middle)
: returns the middle value(s) in an arrayfunction12(takeUntil)
: print out array until given valuefunction13(without)
: takes an array, and a second array that includes what to remove from array 1function14(countOnly)
: counts only desired itemsfunction15(letterPositions)
: prints out the index of every letter in a stringfunction16(map)
: calls provided function on every element in provided array