1.0.0 • Published 5 years ago
@monica_li205/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 @monica_li205/lotide
Require it:
const _ = require('@monica_li205/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(head)
: returns head of arrayfunction2(tail)
: returns tail end of arrayfunction3(middle)
: returns middle of arrayfunction4(assertArraysEqual)
: verifies if 2 arrays are the samefunction5(assertEquals)
: verifies if 2 values are the samefunction6(countLetters)
: counts the how many of each letter are in a wordfunction7(assertObjectsEqual)
: verifies if 2 objects are the samefunction8(eqArrays)
: compares 2 arrays and returns booleanfunction9(eqObjects)
: compares 2 objects and returns booleanfunction10(findKeyByValue)
: returns key with value inputfunction11(findKey)
: returns key based on a conditional inputfunction12(letterPositions)
: returns the index number(s) of a stringfunction13(map)
: returns an array modified by a callback functionfunction14(takeUntil)
: returns the array input up to the point indicated by the callback functionfunction15(without)
: returns array without the elements in the second parameterfunction16(countOnly)
: return counts for a specific subset of those items when given a collection of an items
1.0.0
5 years ago