1.0.0 • Published 11 months ago
@rabiaabdurrehman/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 @rabiaabdurrehman/lotide
Require it:
const _ = require('@rabiaabdurrehman/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(eqArray)
: Comparing two arrays.function2(assertEqual)
: Apply assertion pass/fail on numbers/stringsfunction3( head)
: get first element of an array on terminal.function2(assertArrayEqual)
: apply assertion pass/fail on arrays.function2(middle)
: Find median.function2(tail)
: get last element on the base of expected valuefunction2(countOnly)
: count the mentioned numbers and how many times.function2(countOnly1)
: count the mentioned numbers and how many times.(different approach)function2(findKey)
: find value using keyfunction2(findKeyByValue)
: find a key using value.function2(eqObjects)
: Comparing objects.function2(assertObjectEqual)
: Assertion pass/fail on objects.function2(flatten)
: combine all nested arrays in one array.function2(countLetters)
: How many times a letter appear in a string.function2(letterPositions)
: letters in a string appeared on which position.function2(takeUntil)
: get strings untill condition satisfy.function2(map)
: find letters on a specific position.function2(index)
: All functions are exported.function2(without)
: items to be removed in second argument.
1.0.0
11 months ago