1.0.0 • Published 3 years ago
@zeeplo/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 @zeeplo/lotide
Require it:
const _ = require('@zeeplo/lotide');
Call it:
`const results = _.tail(1, 2, 3) // => 2, 3
Documentation
The following functions are currently implemented:
tail([])
: Returns a tail of an arrymiddle([])
: Returns the middle of an arrayhead([])
: Returns the head of an arrayassertArraysEqual([], [])
: Asserts 2 arraysassertEqual(str1, str2)
: Asserts 2 valuesassertObjectEquals({}, {})
: Asserts 2 objectscountLetters(str)
: Count letters in a given stringeqArrays([], [])
: check if 2 arrays equaleqObjects({}, {})
: Check if 2 objects equalfindKeys({}, callback)
: Find keys in an objectfindKeysByValue(obj, val)
: Find keys by valuefindLetterPosition(val)
: Find all the positions of every letter in valuemap([], callback)
: Map values in arraytakeUnitl([], callback)
: Push values until truthy valuewithout([], [])
: Remove an array of items from array
1.0.0
3 years ago