1.0.0 • Published 3 years ago
@austinsicard/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 @austinsicard/lotide
Require it:
const _ = require('@austinsicard/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArraysEqual)
: Compares two arrays and prints the resultsfunction2(assertEqual)
: Compares two values (String or number) and prints the resultsfunction3(assertObjectEqual)
: Compares two objects and prints the resultsfunction4(countLetters)
: Turns a string into an object with keys containing the amount of letters in the stringfunction5(countOnly)
: Counts how many times a given element appears in an array and returns that numberfunction6(eqArrays)
: Compares two arrays returns true or false depending on if they are the same or notfunction7(eqObjects)
: Compares two objects and returns true or false depending on it they are the samefunction8(findKey)
: Returns the corresponding key when given a valuefunction9(head)
: Returns the first element in an arrayfunction10(letterPositions)
: Takes a string and groups the letters into an array with each index number as the occurencesfunction11(middle)
: Returns the middle value(s) of a given arrayfunction12(tail)
: Returns a new array with everything but the first element of a given arrayfunction13(takeUntil)
: Receives an array and returns a new array with the correct values from the callbackfunction14(without)
: Removes a specified item from a given list
1.0.0
3 years ago