1.0.2 • Published 2 years ago
@anhcodes/lotide v1.0.2
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 @anhcodes/lotide
Require it:
const _ = require('@anhcodes/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head
: returns the first element of arraymiddle
: returns the middle element(s) of the arraytail
: returns the array excluding the first elementflatten
: Returns a single array from an array of arrayscountOnly
: Counts the amount a string appears in an arrayletterPositions
: Returns the index(s) of the letterfindKeyByValue
: It will return the key of the associated value from an objecteqObjects
: Checks if two objects are equal and return true/falseeqArrays
: Checks if two arrays are equal and returns true/false