@cesconettoedu/lotide
v1.0.1
Published
cesconettoedu lotide lighthouse
Downloads
2
Readme
Lotide
A mini clone of the [Lodash]https://lodash.com) 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 @cesconettoedu/lotide
Require it:
const _ = require'@cesconettoedu/lotide');
Call it:
const results = _.tail[1, 2, 3]) // => [2, 3]
Documentation
The following are currently implemented:
assertArraysEqualarr1, arr2);
: compare two arrays for a perfect match.assertEqual
: get first itemassertObjectsEqual
: compare objcountLetters
: return count of each of the letters in that sentencecountOnly
: collection of items and return counts for a specific itemseqArrays
: compare 2 arrayseqObjects
: Implement eqObjects comparing array data.findKey
: for em obj find keyfindKeyByValue
: scan the object, return first key which contains the given valueflatten
: return a flattened version of the array.head
: get first itemindex
: exporting in one file update ShorthandletterPositions
: return string where each character is foundindice).map
: our own version of mapmiddle
: take array, return the middle-most elements)tail
: remove item, not modify array original - update cleantakeUntil
: return slice of the array with elements taken from the beginningwithout
: Return a given array, removing unwanted elements.