1.0.0 • Published 3 years ago
@beigi.payam/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 @beigi.payam/lotide
Require it:
const _ = require('@beigi.payam/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArraysEqual)
: Assertion function to compare two arrays to be equalfunction2(assertEqual)
: Assertion for equality of basic data typesfunction3(assertObjectsEqual)
: Assertion for equality of two objectsfunction1(countLetters)
: Counts the number of times a character is used in a stringfunction2(countOnly)
: Counts the number of times an item is repeated in an arrayfunction3(eqArrays)
: Comapres two arrays to be equalfunction1(eqObjects)
: Compares two objects to be equalfunction2(findKey)
: To find a key in an object by the number of value given to itfunction3(findKeyByValue)
: To find an object key by its valuefunction1(head)
: Returns the first elemet in an arrayfunction2(letterPositions)
: Return indicesin the string where each character is foundfunction3(map)
: Returns a new array based on the results of the callback functionfunction1(middle)
: Returns the middle number in an arrayfunction2(tail)
: Removes the first element of an array and returns the restfunction3(takeUntil)
: Returns a slice of the array based on what callback function requiresfunction3(without)
: Removes the given value from an array
1.0.0
3 years ago