1.0.0 • Published 5 years ago
@eagerbeaver98/lotide v1.0.0
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 @eagerbeaver98/lotide
Require it:
const _ = require('@eagerbeaver98/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual: compares 2 arrays and returns if they are the sameassertEqual: compares 2 values and returns if they are the sameassertObjectsEqual: compares 2 objects and returns if key value pairs are the samecountLetters: returns the number of letters in a stringcountOnlycounts number of specific letters defined by user in a stringeqArrays: uesed by assertArraysEqualeqObjects: used by assertObjectsEqualfindKey: returns keys of objectfindKeyByValue: return key of specific value in an objectflatten: returns a single array of values from an array with 1 layer of subarrayshead: returns first value in an arrayletterPositions: returns a string as an object with the letters and their indexes as key-value pairsmap: returns new array of true values based on callbackmiddle: returns middle value of an array, if even numbered array returns 2 valuestail: returns array without index0takeUntil: returns array until callback is truewithout: removes values from array
1.0.0
5 years ago