1.0.0 • Published 4 years ago
@whirrr.click/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 @whirrr.click/lotide
Require it:
const _ = require('@whirrr.click/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(...): find if two arrays have equal valuesassertEqual(...): find if values are equalassertObjectsEqual(...): find it two objects equal valuescountLetters(...): count the letters in an arraycountOnly(...): count only the specified valueeqArrays(...): find if two arrays are exactly equaleqObjects(...): find if two objects are equalfindKey(...): find the key of an objectsfindKeyByValue(...): find the key by a specified valuehead(...): find the first value in an arrayletterPositions(...): list letters in a string and where they appear by keyindex(...): index of all functionsmap(...): creates a new array with the results of calling a provided function on each elementmiddle(...): find the middle values of an arraytakeUntil(...): log an array until a chosen stopping pointwithout(...): return an array without a specified character
1.0.0
4 years ago