juicyvo
v1.0.0
Published
All my lotide functions
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 i @juicyvo/juicyvo
Require it:
const _ = require('@juicyvo/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head : takes the first value in a elementtail : takes the last value in a elementmiddle : takes the middle element, or middle two in case of a even numberassertEqual : checks if two values are the sameassertArrayEquals : asserts if two arrays are the same or noteqArrays : returns true or false if a array is equalassertObjectsEquals : asserts two objects if they're similiareqObjects : returns true or false if object is the sameflatten : takes a array with arrays within it and makes it into one flat arraytakeUntil : take values until it hits the the second value givenmap : makes a new array with previous arrays valueswithout : returns the values that aren't in the first arrayfindKey : finds the first Key in a object with the value of second entrycountOnly : counts how many times the input shows up in the objecyfindKeyByValue : finds key for a object by the value entered as inputcountLetters : counts how many times the letter showed in a string
