1.0.2 • Published 2 years ago
@nnasr/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 @nnasr/lotide
Require it:
const _ = require('@nnasr/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
map
: return first letter in an array or wordshead
: get the first element in an arraytail
: get the last element in an arraymiddle
: find the middle elements of an arrayfindKey
: find keys in an objectwithout
: remove elements from an arrayeqArrays
: compare if two arrays are equaleqObjects
: compare if two object are equaltakeUntil
: take all the elements until a certain elementcountOnly
: count the amount of names in listassertEqual
: asserts if two values are equalscountLetter
: count letters in a stringfindKeyByValue
: find the value of a key in an objectletterPosition
: find the position of the lettersassertArraysEqual
: asserts if two arrays are equalsassertObjectsEqual
: asserts if two objects are equals