1.0.2 • Published 3 years ago
@arshya_s/lotide v1.0.2
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 @arshya_s/lotide
Require it:
const _ = require('@username/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head: returns the first value of arraytail: returns everything but the first value of arrayassertArraysEqual: assertion for arrays being equalassertEqual: assertion for equal valueseqArrays: returns true if arrays are equal, false otherwiseassertObjectsEqual: asserts if two objects are equal or notcountLetters: counts the letters in a stringcountOnly: counts the letters that are only in the stringeqObjects: returns true if two objects are equal, false otherwisefindKey: checks if key is in objectfindKeyByValue: returns key based on value inputedletterPositions: returns the posiitons of letters in a stringmap: maps values into an input based on a callback functiontakeUntil: returns array of elements that satisfy a callbackwithout: removes elements based on condition