1.0.0 • Published 11 months ago
@vikamir/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 @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 arraysassertEqual(actual, expected)
: checking the functionfassertObjectsEqual(shirtObject, anotherShirtObject)
: compring objectscountLetters(words)
:counting letterscountOnly(allItems, itemsToCount)
:counting itemseqArrays(arr1, arr2)
:comparing arrayseqObjects(object1, object2)
:checking the objects valuefindKey(object, callback)
:finding the callback key in objectindKeyByValuel(obj, value)
:finding the value in object with for loopflatten(nested)
:organized into Planarhead(arr)
:passing the head of an arrayletterPositions(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
1.0.0
11 months ago