1.0.0 • Published 3 years ago
@jayengeo/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 @jayengeo/lotide
Require it:
const _ = require('@jayengeo/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual: prints out if two arrays are equalassertEqual: determines if two arguments are equalcountLetters: counts the total number of each letter in a sentencecountOnly: counts instances of an array if boolean value is trueeqArrays: determines if two arrays are equaleqObjects: determines if two objects are equalfindKey: finds key of an object based on condition inside callback functionfindKeyByValue: finds key of an object by its valueflatten: flattens an array with arrays insidehead: returns the first element of an arrayletterPositions: determines the indices of letters inside a stringmap: maps an array and returns only the first letter of each valuemiddle: returns the middle element of an arraytail: returns the end last element of an arraytakeUntil: returns values of an array while callback condition is falsewithout: removes items from an array
1.0.0
3 years ago