1.0.0 • Published 3 years ago
@ekeneezeeani/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 @ekeneezeeani/lotide
Require it:
const _ = require('@ekeneezeeani/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
tail (...)
: It return an array, removing the first elementmiddle(...)
: It returns the middle element(s) in an arrayeqArrays(...)
: It checks if two arrays are equalfindKey(...)
: It finds an object by its keyfindKeyByValue(...)
: it returns an object key when given the valueflatten (...)
: it flattens a nested arraytakeUntil(...)
: It takes from an array untill a condition is metassertArraysEqual(...)
: asserts the two arrays are equalletterPositions(...)
: returns the position of a letter in a word or sentencecountOnly(...)
:countLetters(...)
: counts the number of individual letters in a word or sentencemap(...)
:Returns a custom modified arrayeqObjects(...)
:check if two objects are thesamereverse(...)
: Reverses a stringpigLatin(...)
: returns a pig latinhead (...)
: Retuens only the first element of an array.
1.0.0
3 years ago