@karendavtyan21/lotide
v1.0.1
Published
functions library
Readme
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 @karendavtyan21/lotide
Require it:
const _ = require('@karendavtyan21/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head(arr): Takes the first value out of an arraytail(arr): Takes all values except the first one out of an arraymiddle(array): Takes a middle value out of an arraycountLetters(lettersToCount): Counts letters in a stringcountOnly(allItems, itemsToCount): Counts the keys that you need in an objectfindKey(object, callback): Finds a key that you need in an objectfindKeyByValue(tvObject, tvShow): Finds a key in an object by valueflatten(array): Flattens multiple arrays that are within each other into one arrayletterPosition(newSentence): Finds a letter position in a stringmap(array, callback): Creates a new array with your function on how you want to change an arraytakeUntil(array, callback): Takes items out of an object until you want it to stopwithout(source, itemsToRemove): Makes a new array without a specific elementeqArrays(arr1, arr2): Checks if two arrays have the same valueeqObjects(object1, object2): Checks if two objects have the same value
