1.1.0 • Published 3 years ago
@rlin98/lotide v1.1.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 @raylin98/lotide
Require it:
const _ = require('@raylin98/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual: function that asserts whether two arrays are equalassertEqual: function that asserts whether two values are equalassertObjectsEqual: function that asserts if two objects are equalcountLetters: function that returns the count of each letter of a stringcountOnly: function that returns the count of each letter in a string but for specified letterseqArrays: function that checks if two arrays are equaleqObjects: function that checks if two objects are equalfindKey: function that returns the key of an object if the value satisfies the condition of the callback functionfindKeyByValue: function that finds a key by a given value that has been passedflatten: function that flattens arrays within arrays to form a single arrayhead: function that returns the first element from an arrayletterPosition: function that returns the indices of where each character is found within the stringmap: function that creates a new array based on the results of the callback functionmiddle: function that returns the middle element of an arraytail: function that returns every element after the first element of an arraytakeUntil: function that returns elements of an array up to a specified point based on callbackwithout: function that removes elements of an array based on user input