1.0.0 • Published 4 years ago
@nadyacorscadden/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 @nadyacorscadden/lotide
Require it:
const _ = require('@nadyacorscadden/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(): console logs whether or not arrays are equalassertEqual(): console logs whether or not two values are equalassertObjectsEqual(): console logs whether or not two objects are equalcountLetters(): counts the number of each letter in a stringcountOnly(): counts the number of specific items in an arrayeqArrays(): determines whether two arrays are equaleqObjects(): determines whether two objects are equalfindKey(): finds the key with the first instance of a specific key valuefindKeyByValue(): finds a specific key by its valueflatten(): flattens one set of arrays within an arrayhead(): returns the first value in an arrayletterPositions(): returns the index values of letters in a stringmap(): finds specific values within an array determined by a funciton inputmiddle(): returns the middle value(s)tail(): returns the tail of an arraytakeUntil(): returns an array with an input-function-determined stopping pointwithout(): returns array without specified values
1.0.0
4 years ago