1.0.0 • Published 4 years ago
@alulaleak/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 @alulaleak/lotide
Require it:
const _ = require('@alulaleak/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual()
: asserts if arrays are equalassertEqual()
: asserts if a primitive value is equalassertObjectsEqual()
: asserts if an object is equalcountLetters()
: counts letters of a stringcountOnly()
: counts only what you allow it toeqArrays()
: returns true or false based off if array is equaleqObjects()
: returns true or false based off if object is equalfindKey()
: finds the key of specifiedfindKeyByValue()
: finds key of specified valuehead()
: returns the beginning element of an arraytail()
: returns the whole string except for the first valuemap()
: returns a new array based on the results of the callback functionmiddle()
: returns the middle element of an array - returns empty array if even number of elementsletterPosition()
: returns the letter position of specified lettertakeUntil()
: returns a new array until a specified valuewithout()
: returns a new array without a specified value
1.0.0
4 years ago