1.0.0 • Published 1 year ago
@lpdancona/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 @lpdancona/lotide
Require it:
const _ = require('@lpdancona/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArraysEqual)
: compares actual and expected arraysfunction2(assertEqual)
: compares actual to expectedfunction3(assertObjectsEqual)
: compares objectsfunction4(countLetters)
: counts the letters of an stringfunction5(countLetters)
: counts the letters of an stringfunction6(countOnly)
: it only counts an specific itemfunction7(countOnly)
: it only counts an specific itemfunction8(eqArrays)
: compares two arrays and returns true or falsefunction9(eqArrays)
: compares two objects and returns true or falsefunction10(findKey)
: finds specific key in a objectfunction11(findKeyByValue)
: finds specific key in a object using the valuefunction12(head)
: finds the first item of an arrayfunction13(letterPositions)
: tells the index of an letter in a arrayfunction14(map)
: creates a new array populated with the results of calling a provided function on every element in the calling arrayfunction15(middle)
: finds the items of the middle of an arrayfunction16(middle)
: finds the items of the middle of an arrayfunction17(tail)
: populates a new array with all the items of an array except the firstfunction18(takeUntil)
: it will push items to an array until condition is satisfiedfunction19(without)
: returns first argument without the second argument
1.0.0
1 year ago