1.0.0 • Published 3 years ago
@ammar.kusow/lotide v1.0.0
lotide
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 @ammar.kusow/lotide
Require it:
const _ = require('@ammar.kusow/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArrayEqual)
: checks if all arrays are equalfunction2(assertEqual)
: checks if two values are equalfunction3(assertObjectEqual)
: checks if two objects are equalfunction4(countLetter)
: will count the amount of letters in a stringfunction4(countOnly)
: returns the amount of times something comes up within an objectfunction5(eqArrays)
: checks if the arrays.length and the arrays indexes are the samefunction6(eqObjects)
: checks if the objects.length and the objects indexes are equalfunction7(findKey)
: takes an object and returns the first keyfunction8(findKeyByValue)
: take an object and returns a key by valuefunction9(head)
: outputs the first item in an arrayfunction10(letterPositions)
: tells you the position of each letter in a stringfunction9(map)
: returns a new array with the callback function afunction9(middle)
: returns the middle index of an arrayfunction9(tail)
: return the last index of an arrayfunction9(takeUntil)
:returns an array of elements back to the callback functionfunction9(without)
: returns a new array without the item you want removed
1.0.0
3 years ago