1.0.0 • Published 5 years ago
@yungcomputer/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('@username/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(countLetters)
: counts letters in a given stringfunction2(countOnly)
: counts and returns only the values specified in a listfunction3(findKey)
: finds the given key in an objectfunction4(findKeyByValue)
: finds the key in an object using given valuefunction5(flatten)
: changes an array with sub arrays to one single arrayfunction6(head)
: returns the head (first element) of a listfunction7(letterPositions)
: returns the positions of the letters in a stringfunction8(map)
: returns the first letter of each string instance in an arrayfunction9(middle)
: returns the middle value of an array and the middle two values of an array if the array length is an even numberfunction10(min)
: returns the smallest value in a listfunction11(asertArrraysEqual)
: assertion to determine if two arrays are equal or notfunction12(assertEqual)
: assertion test if to given parameters are equalfunction13(assertObjectsEqual)
: assertion test if two objects are equalfunction14(eqArrays)
: determines if two arrays are the samefunction15(eqObjects)
: determines if two objects are the samefunction16(tail)
: returns the last item of an arrayfunction17(takeUntil)
: prints out a list until parameter givenfunction18(without)
: returns an array with given parameter taken out of the original array
1.0.0
5 years ago