1.0.2 • Published 4 years ago
@robinshrestha/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 @robinshrestha/lotide
Require it:
const _ = require('@username/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual: Evaluate if the two given arrays are equal or notassertEqual: Evaluate if the two given inputs are equal or notassertObjectsEqual: Evaluate if the two given objects are equal or notcountLetters: Create an object from input string with keys as letters and values as how many times they appearcountOnly: Count the number of times a given object element items occurs in a given array of items.eqArrays: Evaluate the two input array whether they are equal or noteqObjects: Evalute whether two given objects are equal or notfindKey: Find the key in a given object with the given conditionfindKeyByValue: Find the key of a given object and a valueflatten: Remove all nested arrays from a given array inputhead: Output a first element of an input arrayletterPositions: Output index of all the letters in a given stringmap: get an modifed array from the given array and a coditionmiddle: Output middle elements from an input arraytail: Out put an array without the first element of the given arraytakeUntil: Get a new array with an input array and a condition satisfying the elementswithout: Output array whose elements are not common in the two input arrays