1.0.0 • Published 7 years ago
@giroly/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 @giroly/lotide
Require it:
const _ = require('@giroly/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(arrayOne, arrayTwo): Asserts whether two Arrays are EqualassertEqual(actual, expected): Asserts whether two strings are EqualassertObjectsEqual(object1, object2): Asserts whether two Objects are EqualcountLetters(string): Counts letters in a stringcountOnly(allItems, itemsToCount): Count given strings from a List (Example: Names of a List)eqArrays(arrayOne, arrayTwo): Checks if two given arrays are exactly the sameeqObjects(object1, object2): Checks if two given objects are exactly the samefindKey(object, callback): Find a given Key from an objectfindKeyByValue(object, value): Find a given Key by Valueflatten(arrayThick): Returns a non-nested Arrayhead(element, elementTwo): Returns the first value of an arrayindex: Function IndexletterPositions(sentence): Return index position of a given lettermiddle(array): Return middle value of an Arraytail(element, elementTwo): Returns the last value of an arraytakeUntil(array, callback): Takes values until Callback is Fulfilledwithout(sourceArray, toRemove): Removes given value from an Array
1.0.0
7 years ago