README
Lotide
A mini clone of the Lodash library.
Purpose
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.
Usage
Install it:
npm install charles.thompson/lotide
Require it:
const _ = require('charles.thompson/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArrayEquals(arr1, arr2)
: the first three functions are for testing assertions if the actual is equal to the expectedassertEqual(arr1, arr2
):assertObjectsEqual(arr1, arr2)
:countLetters(str)
: takes in a string and counts each of the letterscountOnly(allItems,itemsToCount)
: return a proper report on all the strings found in the input array, and their respective countseqArrays(arr1, arr2)
: runs two arrays to see if they matcheqObjects(obj1,obj2)
:runs two objects to check for matchfindKey(obj, callback)
: checks value of keys in objectfindKeyByValue(obj, val)
: checks value and reports back key of objhead(array)
: takes first index of arrayletterPositions(sentence)
: finds placement of letters and sums togethermap(arr, callback)
: takes first value from each part of stringmiddle(array)
: returns middle of array, sums together even arraytail(arr)
: returns all but 0 index of arraytakeUntil(str, callback)
: reports back string upon unser inputwithout(source, ItemToRemove)
: removes from array with user input