1.0.0 • Published 5 years ago
@aeunderhill/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 @aeunderhill/lotide
Require it:
const _ = require('@aeunderhill/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual: returns true of false if arrays are equalassertEqual: returns true if an actual arugment is the same as expectedassertObjectsEqual: function for returning true if two objects equalcountLetters: counts the reoccurence of letters in a stringcountOnly: returns specific items to count from total itemseqArrays: returns true if two arrays are equaleqObjects: returns true if two objects are equalfindKey: returns the key of an objectfindKeyByValue: returns the specific key of a given callback valuehead: returns the first element of an arrayletterPositions: returns the index of letters in an stringmap: creates a new array based on a callback functionmiddle: finds the middle element of an arraytail: returns the last element of an arraytakeUntil: based on callback will return the elements of an array until callback is filledwithout: returns new array based on set of elements to remove
1.0.0
5 years ago