1.0.1 • Published 3 years ago
@teetime/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 @teetime/lotide
Require it:
const _ = require('@teetime/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArrayEqual(...): Checks if two arrays are equal.assertEqual(...): Checks if two items are equal.assertObjectsEqual(...): Checks if two objects are equal.countLetters(...): Counts the letters of a string.countOnly(...): return a count of items of an array (allitems) specified by the items to count.eqArrays.js(...): Checks if two arrays are equaleqObjects(...): Checks if two objects are equalfindKey(...): Return the key in an object as specified by callback functionfindKeyByValue(...): Returns a key as specified by the title (string)flatten(...): Returns all items in an array and its nested arrays as a single dimension array.head(...): Checks for the first element of an arrayletterPositions(...): Returns an object of the index of each letter from inputmap(...): Maps each item according to the callback functionmiddle(...): Returns the middle element if array is odd, the middle two elements if even and empty array if array is length 2 or less.