1.0.1 • Published 3 years ago
@tbrowwnnn/lotide v1.0.1
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 @tbrowwnnn/lotide
Require it:
const _ = require('@tbrowwnnn/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head
: returns everything from an array except the last valuetail
: returns everything from an array except the first valuemiddle
: returnst the middle value from an arraycountLetters
: returns an object showing how many letters are in a stringcountOnly
: determins is a value is present in an object listfindKey
: finds the first key in a object based on a value in another objectfindKeyByValue
: finds a key based on the valueflatten
: takes nested arrays and turns them into one arrayindex
: list of functions that allow you to call other functions in the folderletterPositions
: returns a object from a string that will determine the position of each letter.takeUntil
: Pull items from an array into another array and until it reaches as certain value.without
: add an array element to a new array unless it matches a value that you determine.