1.0.2 • Published 3 years ago
@lunamoonmoon/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 @lunamoonmoon/lotide
Require it:
const _ = require('@lunamoonmoon/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head: finds first value in arraytail: finds all but first value in arraymiddle: finds middle value or valueseqArrays: checks if both arrays have identical valueseqObjects: checks if both objects have identical key valueswithout: removes specified value from array and returns new arrayflatten: flattens nested arrayscountOnly: returns object containing counts of everything in input objectcountLetters: returns a count of each letter in input stringletterPositions: finds positions based on letter and strign inputfindKeyByValue: finds the corresponding key based on input valuefindKey: finds key belonging to input valuemap: returns a new array based on results from callback function inputtakeUntil: returns a slice of the input array with elements taken from the beginning