1.1.2 • Published 3 years ago
@jciurc/lotide v1.1.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 @symphony/lotide
Require it:
const _ = require('@symphony/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertEqual(...)
: Compares if two items are identical or nothead(...)
: Returns the first element of an arraytail(...)
: Omits the first element of an array and returns the restmiddle(...)
: Returns the middle (or middle two) elements of an arrayflatten(...)
: Flattens an array of any depth to a single levelcountOnly(...)
: Takes a list and list of items to count and returns a report with the totalsmap(...)
: Takes an array and applies a callback function to each element, then returns results in a new arrayfindKey(...)
: Checks each value in an object for the provided condition, returns key name when foundfindKeyByValue(...)
: Searches for given value in an object and returns first key name that matches