1.0.0 • Published 4 years ago
@toktam/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 @toktam/lotide
Require it:
const _ = require('@toktam/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(a1, a2)
: takes in two arrays and console.log an appropriate message to the console.assertEqual(actual, expected)
: the function compares the two values it takes in and print out a message telling us if they match or not.eqObjects(object1, object2)
: takes in two objects and returns true or false, based on a perfect match.assertObjectsEqual(object1, object2)
: takes in two objects and helps us easily test functions that return objects.countLetters()
:countOnly()
:eqArrays()
: takes two arrays and checks if they are the same.eqObjects()
:findKey()
:findKeyByValue()
:head()
:letterPositions()
:map()
:middle()
:tail()
:takeUntil()
:without()
:
1.0.0
4 years ago