1.0.0 • Published 3 years ago
@methujan/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 methujan/lotide
Require it:
const _ = require('methujan/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArraysEqual)
: Checks if arrays are equalfunction2(assertEqual)
: Checks if two values are equalfunction3(assertObjectsEqual)
: Checks if two objects are equalfunction4(countLetters)
: Counts the frequency of letters in a stringfunction5(countOnly)
: Counts given item to countfunction6(eqArray)
: Returns true if both arrays have identical valuesfunction7(eqObjects)
: Returns true if both objects have identical keys with identical valuesfunction8(findKey)
: Finds key with callback functionfunction9(findKeyByValue)
: Finds key with given valuefunction10(head)
: Returns first index of an arrayfunction11(index)
: Index of Lotidefunction12(letterPositions)
: Keeps a object with the position of each letter in the sentencefunction13(map)
: Maps value given callback functionfunction14(middle)
: Returns middle valuesfunction15(tail)
: Returns values after the first elementfunction16(takeUntil)
: Takes elements from an array until the condition is met by the callback functionfunction17(without)
: Remove given items from array
1.0.0
3 years ago