1.0.0 • Published 3 years ago
@cookie-cpu/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 @cookie-cpu/lotide
Require it:
const _ = require('@cookie-cpu/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
eqArrays()
: Compares 2 arrays and returns true if equaleqObjects()
: Compares 2 objects and returns true if equalcountLetters()
: Takes in a string and returns an object listing each letters occurencefindKey()
: Searches an object for a key using a callback functionfindKeyByValue()
: Searches an object and returns the key based on the given valuehead()
: Takes an array and returns the first element of the arraymiddle()
: Takes an array and returns the values in the middle index of the arraytail()
: Takes an array and splits the first element from the restwithout()
: Takes an array and a list of elements to remove and iterates through the array removing those items
function1(...)
: descriptionfunction2(...)
: descriptionfunction3(...)
: description
1.0.0
3 years ago