@izzybella12/lotide
v1.0.0
Published
Simple functions taught by Lighthouse Labs and impleneted by student
Downloads
3
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 @izzybella12/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 element of an inputed arraytail()
: returns the last element of an inputed arrayeqArrays(...)
: returns true or false based on a perfect match between two arraysassertEqual(...)
: compares an inputted actual and expected value and returns messageassertArraysEqual
: returns a message based on the result of eqArrayswithout(...)
: returns the subset of a given array, removing unwanted elementsmiddle()
: returns the middle-most element(s) of an inputted arraycountLetters(...)
: returns a letter count of the letters of an inputted stringcountOnly(...)
: returns an object counting everything the input object listedletterPositions(...)
: returns the letter positions found in an inputted stringfindKeyByValue(...)
: scans inputted object, finds first key containing inputted valueeqObjects(...)
: returns true or false based on a perfect match between two objectsassertObjectsEqual(...)
: returns a message based on the result of eqObjectstakeUntil(...)
: collects items from inputted array until inputted callback is truthyfindKey(...)
: scans inputted object, returns 1st key making inputted callback truthymap(...)
: returns a new array based on the results of the callback function