1.0.0 • Published 2 years ago
@lpattersonn/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 @lpattersonn/lotide
Require it:
const _ = require('@lpattersonn/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
Test Functions:
(assertArraysEqualTest)
: A mocha and chai unit test for the assertArraysEqual.js file.assertEqualTest
: A mocha and chai unit test for the assertEqual.js file.headTest
: A mocha and chai unit test for the head.js file.middleTest
: A mocha and chai unit test for the middle.js file.tailTest
: A mocha and chai unit test for the tail.js file.
Functions:
assertArraysEqual
: Compare the actual vs expected values.assertEqual
: Assert that two arrays are equal.assertObjectsEqual
: Take in two objects and return a given response.countLetters
: Return a count of each of the letters.countOnly
: Return counts of specific items.eqArrays
: Compare arrays.eqObjects
: Take in two objects and return true or false.findkey
: Scan the object and return the first key.findKeyByValue
: Return the first key that contains a given value.head
: Return just the first element.index
: A file containing utility functions.letterPositions
: Return a object with the positions of letters in a string.map
: Return a new array based on the callback function.middle
: Find the middle value.tail
: Return all elements expect the first element.takeUntil
: Take items from a provided array untill the callback returns true.without
: Remove unwanted items.
1.0.0
2 years ago