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 @christylumm/lotide
const _ = require('@christylumm/lotide');
const results = _.tail([1, 2, 3]) // => [2, 3]
The following functions are currently implemented:
assertarraysEqual(actual, expected): Implement assertArraysEqual which will take in two arrays and console.log an appropriate message to the console.
assertEqual(actual, expected): Make the function compare the two values it takes in and print out a message telling us if they match or not
countLetters(sentenceString): This function could return an object where each unique character encountered in the string is a property of the object and the value for that property/key should be the number of occurrences for that character.
countOnly(allItems, itemsToCount): This function should take in a collection of items and return counts for a specific subset of those items.
eqArrays(arr1, arr2): Implement a function eqArrays which takes in two arrays and returns true or false, based on a perfect match.
eqObjects(object1, object2): Implement the definition for function eqObjects which will take in two objects and returns true or false, based on a perfect match.
head(arr): A function which returns the first item in the array.
tail(arr): A function which returns every element except the head (first element) of the array.
middle(arr): A function which will take in an array and return the middle-most element(s) of the given array.