1.0.0 • Published 5 years ago
@munraj/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 @username/lotide
Require it:
const _ = require('@username/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
eqArrays: checks if two arrays are equalassertEqual: runs assertion check on non arraysassertArraysEqual: runs assertion check on two arrayshead: returns the first item of the arraymiddle: returns items at the middle of the arraytail: returns array after removing first itemassertObjectsEqual: runs assertion check on two objectscountLetters: counts all the letters in a stringeqObjects: checks if two objects are equalfindKey: finds the key of an objectfindKeyByValue: finds the key of an object based on the value of the keyflatten: takes nested array and turns it into a non nested arrayletterPositions: returns the position of a letter in a given stringmap: does map stufftakeUntil: returns all items in the array until the given valuewithout: returns all items in the array excluding the
1.0.0
5 years ago