1.0.0 • Published 3 years ago
@nelsonchengg/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 @nelsonchengg/lotide
Require it:
const _ = require('@nelsonchengg/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual: Checks if actual array equals expected arrayassertEqual: Checks if actual equals expectedassertObjectsEqual: Prints a statement indicating if actual object equals expected objectcountLetters: Counts letters in a string and places them into an object to readcountOnly: Counts indicated items and places them into an object to readeqArrays: Checks if actual array equals expected arrayeqObjects: Checks if actual object equals expected objectsfindKey: Finds the key with the associated valuefindKeyByValue: Find the key associated with the indicated valuehead: Returns the index value 0 from your arrayletterPositions: Returns the letters of a string into an object and indicates their positionmap: Performs a callback function on all items in an arraymiddle: Returns the middle values of an arraytail: Returns the array without index value 0takeUntil: Pushes values into an array until the callback function condition is metwithout: Creates a new array by removing the items from an indicated array
1.0.0
3 years ago