1.0.0 • Published 5 years ago
@jennifer.g/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 @jennifer.g/lotide
Require it:
const _ = require('@jennifer.g/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual: checks to see if 2 arrays are equalassertEqual: checks to see if the output matches the expected outputassertObjectsEqual: checks to see if 2 objects are equalcountLetters: counts the letters in a stringcountOnly: counts the number of times a given input occurseqArrays: returns true if 2 arrays are equaleqObjects: returns true if 2 objects are equalfindKey: returns the keyfindKeyByValue: returns a key name given the valueflatten: returns one array from an array of arrayshead: returns the first element of the inputindex: file to export all functionsletterPositions: returns the index location of a given lettermap: reutns an array based on the callback functionmiddle: returns the middle of an array, array must be at least 3 elementstail: returns the end of an input, everything except the headtakeUntil: returns the begininning of an array until it reaches a truthy value - based on callbackwithout: returns an array without a given element
1.0.0
5 years ago