1.0.0 • Published 4 years ago
@arismink/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 @arismink/lotide
Require it:
const _ = require('@arismink/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(...): function that confirms two arrays are equalassertEqual(...): function that confirms two inputs are equalassertObjectsEqual(...): function that confirms two objects are equaleqArrays(...): function that checks if two arrays are equaleqObjects(...): function that checks if two objects are equalcountLetters(...): function that counts the number of letters in an inputcountOnly: function that counts only for the specified parameter in a given arrayfindKey: function that returns the keys of an object using a callback functionfindKeyByValue: function that returns the key of a specified value in an objectflatten: function that 'flattens' an arrayhead: function that returns the element at index 0letterPositions: function that returns an object containing the positions of all the characters in a given stringmap: function that returns a new array with each element having been modified by the specified callback functionmiddle: function that returns the middle value of an arraytail: function that returns all elements after index 0takeUntil: function that performs a callback function on each element of an array until specified elementwithout: function that returns a subset of a given array with all unwanted elements removed
1.0.0
4 years ago