1.0.0 • Published 4 years ago
@mistatg/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 @username/lotide
Require it:
const _ = require('@mistatg/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(...)
: Determines whether two arrays are equalassertEqual(...)
: Determines whether two inputs are equalassertObjectsEqual(...)
: Determine whether two objects are equalcountLetters(...)
: Counts the number of times a letter is repeated in the argument passedcountOnly(...)
: Returns only the items that are identified in the second argumenteqArrays(...)
: Checks for equality between arrayseqObjects(...)
: Checks for equality between objectsfindKey(...)
: Returns the first key that returns a truthy valuefindKeyByValue(...)
: Returns the key of the value neededflatten(...)
: Takes in an array within an array and converts it into onehead(...)
: Returns the first item of an arrayletterPositions(...)
: returns the indexes in a string with a specific charactermap(...)
: Takes in an array that will return output based on the callback functionmiddle(...)
: Returns the middle element(s)tail(...)
: Returns every element in the array with exception of the headtakeUntil(...)
: Pushes items into a separate array until the callback function provides a truthy value *without(...)
: Iterates through an array and removes items based on the second argument
1.0.0
4 years ago