1.0.0 • Published 4 years ago
@rplawn/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 @rplawn/lotide
Require it:
const _ = require('@rplawn/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual function: check if two arrays are equalassertEqual function: check if two values are equalcountLetters function: count number of characters in a stringcountOnly function: count given items onlyeqArrays function: check if arrays are equaleqObjects function: check if objects are equalfindKey function: return a particular key through callbackfindKeyByValue function: returns the key with the given valueflatten function: remove nested arrays and print single arrayhead function: pull first item in an arraymap function: return new array based on callback functionmiddle function: print middle values of arraytail function: print everything except first item in arraytakeUntil function: print array until callback is executedwithout function: return subset of array without unwanted items
1.0.0
4 years ago