1.0.0 • Published 3 years ago
@mxg1828/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 @mxg1828/lotide
Require it:
const _ = require('@mxg1828/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArraysEqual)
: compare 2 arrays, print a message of if identical or notfunction2(assertEqual)
: compare 2 value, print a message of if identical or notfunction3(assertObjectsEqual)
: compare 2 objects, print a message of if identical or notfunction4(countLetters)
: how many time each letter occurfunction5(countLetters)
: hou many time 'these' letter occurfunction6(eqArrays)
: if 2 arrays are identical return ture, else return falsefunction7(eqObjects)
: if 2 objects are identical return ture, else return falsefunction8(findKey)
: list key of objectfunction9(findKeyByValue)
: return the key of given objectfunction10(flatten)
: open one layer of a nested arrayfunction11(head)
: return fisrt elementfunction12(letterPositions)
: return a list of index of each letter in a sentencefunction13(map)
: exexute a callback function on a arrayfunction14(middle)
: return the middle one or two element of an arrayfunction15(tail)
: return a array without it's first elementfunction16(takeUntil)
: return every element of the array untill callback function return turefunction17(without)
: return elements in the first array that the second array doesn't have
1.0.0
3 years ago