1.0.0 • Published 4 years ago
@therealfady/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 @therealfady/lotide
Require it:
const _ = require('@therealfady/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(...): tests that 2 arrays are qualassertEqual(...): tests that 2 inputs are equalassertObjectEqual(...): tests that 2 obje ts are equalcountLetters(...): test that shows how many times a letter appears in a stringcountOnly(...): test that coounts how many times a string appears in an arrayeqArray(...): test that 2 arrays are equaleqObject(...): test that 2 objects are equalfindKeyByValue(...): test to find a key by value in an objectfindKey(...): test to find a key in an objecthead(...): test to print the 1st element in amn arrayletterPositions(...): test to print the the position of letters in an stringmap(...): test to return the first letter of each string in an arraymiddle(...): test to give the middle eleemnt in an arraytail(...): test to print everthing but the 1st element in an arraywithout(...): test to print whats missing in the 1st array when compared with anothertakeUntil(...): descriptiontest to return elements in an array till a certain vale in the input array
1.0.0
4 years ago