@bhood239/lotide
v1.0.2
Published
lotide javascript library
Downloads
34
Readme
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 @bhood239/lotide
Require it:
const _ = require('@bhood239/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
without(...): Takes a given array and given indices and returns a new array without the given indicestakeUntil(...): Takes a given array and returns the same array up to the point of a given indextail(...): Takes a given array and returns the same array minus the first indexmiddle(...): Returns the middle item/items of a given arrayletterPositions(...): Returns the positions that a given letter appears in a stringhead(...): Returns the first index in a given arrayflatten(...): Flattens a multidimensional arrayfindKeyByValue(...): Returns the key associated with a given value from a given objectfindKey(...): Finds the key that matches a callback functioneqObjects(...): Determines if 2 objects are equaleqArrays(...): Determines if 2 arrays are equalcountOnly(...): Counts the amount of times that a given index appears in an object when given truecountLeters(...): Counts the amount of times that a given letter appears in a stringassertObjectEqual(...): Asserts if an object matches a given expected objectassertArraysEqual(...): Asserts if an array matches a given expected arrayassertEqual(...): Asserts if a value matches a given expected value
