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.
npm install @adam-brendan/lotide
const _ = require('@adam-brendan/lotide');
const results = _.tail([1, 2, 3]) // => [2, 3]
The following functions are currently implemented:
countLetters: creates an object with the count of each letter in a string
countOnly: counts the instances of given values in an array
eqArrays: checks if two arrays are equal
eqObjects: checks if two objects are equal
findKey: finds the key of an object that corresponds to a callback
findKeyByValue: finds the key of an object using a given value
flatten: flattens a nested array to one level of depth
head: returns the first value of an array
letterPositions: returns the index values of all letters in a string
middle: returns the middle value(s) of an array
tail: returns an array with the first value removed
takeUntil: prints each value of an array until a given condition is met
without: take an array and removes a specific value