@2san/lotide v1.0.2
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 @2san/lotide
Require it:
const _ = require('@2san/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head(...)
: retrieves head value or first element in an arraytail(...)
: retrieves tail values or elements in array starting from index 1middle(...)
: retrieves middle elements in an array, will return an array with two elements if original array is of even length.assertEqual(...)
: Colorful Assertion test, checks if two values are === equalassertArraysEqual(...)
: Colorful Assertion test to be used on array values. checks if two arrays are equal.countOnly(...)
: counts items in array based on objects marked as trueeqArrays(...)
: checks recursively if arrays are equaleqObjects(...)
: checks objects recursively if they are equalletterPositions(...)
: stores character letter positions from a stringflatten(...)
: flattens arrays one layerfindKeyByValue(...)
: retrieves keys from object using a value
The following functions are working, but do not have tests completed: assertObjectsEqual, countLetters, findKey, map, takeUntil, without,