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 @vikamir/lotide
Require it:
const _ = require('@vikamir/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
-
assertArraysEqual(arr1, arr2)
:comparing arrays -
assertEqual(actual, expected)
: checking the function -
fassertObjectsEqual(shirtObject, anotherShirtObject)
: compring objects -
countLetters(words)
:counting letters -
countOnly(allItems, itemsToCount)
:counting items -
eqArrays(arr1, arr2)
:comparing arrays -
eqObjects(object1, object2)
:checking the objects value -
findKey(object, callback)
:finding the callback key in object -
indKeyByValuel(obj, value)
:finding the value in object with for loop -
flatten(nested)
:organized into Planar -
head(arr)
:passing the head of an array -
letterPositions(sentence)
:finding the letters position in a sentensmap(array, callback)
:creates a new array populated with the results of calling a provided functionmiddle(arr)
:passing the middle of an arraytakeUntil(array, callback)
:passing part of an arraywithout(source, itemsToRemove)
:removing and passing the given arrays