1.0.0 • Published 4 years ago
@jameshuang98/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 @jameshuang98/lotide
Require it:
const _ = require('@jameshuang98/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(...): assertion check to see if two arrays are equalassertEqual: assertion check to see if two values are equalassertObjectsEqual: assertion check to see if two objects are equalcountLetters: counting individual letters in a stringcountOnly: counting only specific items in an arrayeqArrays: checking if two arrays are equaleqObjects: checking if two objects are equalfindKey: finding the key of an object given a callback functionfindKeyByValue: finding the key of an object given a valuehead: returning the first element of an arrayletterPositions: returning the positions of a specific letter in an arraymap: similar to Array.map() functionmiddle: returning the middle element(s) of an arraytail: returning the tail elements of an arraytakeUntil: returning the array until a specific condition given by a callback functionhead: returning the first element of an arraywithout: returning an array without a specific item
1.0.0
4 years ago