@jackiestchen/lotide
v1.0.4
Published
Update eqObjects, eqArrays
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 @jackiestchen/lotide
Require it:
const _ = require('@jackiestchen/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual
: assert 2 arraysassertEqual
: assert 2 valuesassertObjectsEqual
: assert 2 objects (incomplete)countLetters
: count letters in a stringcountOnly
: count key/value pair in objecteqArrays
: test if two arrays are the same type and valueeqObjects
: test if two objects are the same key/value pair (incomplete)findKey
: find Key in objectfindKeyByValue
: find Key by value in objectflatten
: flatten a nested arrayhead
: return element of index 0 of an arrayletterPositions
: return first index position of a stringmap
: map with call back functiontail
: return a new array without the first elementtakeUntil
: return a new array until first occurence of callback functionwithout
: return a new array without elements from 2nd array