1.0.1 • Published 4 years ago
@kagin007/lotide v1.0.1
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 @username/lotide
Require it:
const _ = require('@username/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual([]): checks if two arrays are the same,assertEqual([]): asserts if two array are the sameassertObjectsEqual([]): checks if two Objects are teh samecountLetters([]): count the number of times a letter appears in an arraycountOnly([]): count how many times an element appears in an arrayeqArrays([]): checks if two arrays are teh sameeqObjects({}): checks if two objects are the samefindKeyByValue([]):flatten([]): 'flattens' nested arrays into one arrayletterPositions([]): advises on the index position of a given letterrecursiveEqArrays([]): asserts if two arrays are teh same, including nested arraysBETA recursiveEqObj({}): not working yethead([array]): returns the first element of an arraytail([array]): cuts the head off the array and returns the differencemiddle([array]): returns the middle elements of an array