@blufuu/lotide
v1.2.0
Published
a library of functions based on Lodash
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 @blufuu/lotide
Require it:
const _ = require('@blufuu/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual: asserts that an array will truthy or not using eqArrayseqArrays: checks to see if two arrays are strictly equalassertEqual: asserts an actual, expected value. only use for primitiveassertObjectEquals: asserts two objects to be equal or not. uses eqObjects to checkeqObjects: checks to see if two objects are strictly equalcountLetters: counts and returns the number of letters in an objectcountOnly: checks an obects to see what values to keep track of by passing on itemsToCount objectfindKey: using a callback to find the key in an objectfindKeyByValue: same as findKey but will find the key of an object by value, if it exists in the objectflatten: flattens an array to a single levelhead: returns the 0 index value of an arrayletterPosition: checks to see what index value is a letter in a string, and returns it to an objectmiddle: returns the middle value (or values) of an arraytail: returns the all the values of an array after 0takeUntil: pushes values into a new array until it reaches the specified indexwithout: returns a new array, without value specifiedmap: returns an element based on parameter callback
