1.0.0 • Published 2 years ago
@rabiepenpm/reprehenderit-tempora-ex v1.0.0
Lotide :dizzy:
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 @rabiepenpm/reprehenderit-tempora-ex
Require it:
const _ = require('@rabiepenpm/reprehenderit-tempora-ex');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual: assertion function for arraysassertEqual: assertion function for primitive valuesassertObjectsEqual: assertion function for objectscountLetters: counts how many of each letter there is in a stringcountOnly: counts only specific values in an arrayeqArrays: comparison function for arrayseqObjects: comparison function for objectsfindKey: finds the key in an object whose value matches a certain criteriafindKeyByValue: finds the key in an object by its valueflatten: flattens a nested array (only for 2-level arrays)head: returns the first value in an arrayletterPositions: returns the positions of letters in a stringmap: a clone of the Array.prototype.map methodmiddle: returns the middle element(s) of an arraytail: returns all the values except the first one of an arraytakeUntil: takes elements of an array until a condition becomes truewithout: returns a copy of an array without certain elements
1.0.0
2 years ago