1.0.0 • Published 3 years ago
lotide-project 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 @SJ-WJ/lotide
Require it:
const _ = require('@SJ-WJ/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual: Asserts array functions determining if they match or notassertEqual: Asserts values determining if they match or notassertObjectsEqual: Asserts objects determining if they match or notcountLetters: Counts each letter and each instance the letter is presentcountOnly: Counts a specifed amounteqArrays: Compares arrayseqObjects: Compares objectsfindKey: Returns value of key once the callback returns a truthy valuefindKeyByValue: Returns the key if the values matchhead: Returns the first element of an arrayindex: List of all functions used in lotideletterPositions: Returns the indices of each lettermap: Creates a new arraymiddle: Returns the middle elements of an arraytail: Returns all elements of the array except the first onetakeUntil: Returns array from first index up until stated pointwithout: Removes elements from arrays
1.0.0
3 years ago