1.1.1 • Published 2 years ago
@zasal1990/lotide v1.1.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 @zasal1990/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 0th element of arraytail
: returns everything but 0th element of arraywithout
: returns array in first argument without data passed as second arguementtakeUntil
: returns array until element passed as second arguementmiddle
: returns middle element of the arraymap
: returns array with inline call back functionalityletterPositions
: returns position of letterfaltten
: returns flattened arraysfindKeyByValue
: returns object key for value specifies as second argumentfindKey
: returns keys of an objecteqObjects
: returns true/false by comparing objects keys and valueseqArrays
: returns true/false by comparing array valuescountOnly
: counts items specified as second argument inside object passed as first arguementcountLetters
: returns count of letters in the first arguement as specified in second argumentassertObjectsEqual
: returns assertion if objects are equalassertArraysEqual
: returns assertion if arrays are equalassertEqual
: returns assertion if primitive inputs are equal