1.0.0 • Published 6 years ago
@pratikbassi/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 @pratikbassi/lotide
Require it:
const _ = require('@pratikbassi/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(array1 array2): returns whether or not two functions are equalassertEqual(item1 item2): returns whether or not two items are equalassertObjectEqual(object1 object2): returns whether or not two objects are equalcountLetters(string): counts the letters in the stringcountOnly(items itemsToCount): count the items searched for and return their amounts in an objecteqArrays(array1 array2): returns whether or not two arrays are equaleqObjects(object1 object2): returns whether or not two objects are equalfindKey(object1 function): returns all the keys that have values that satisfy the functionfindKeyByValue(object1 string): returns the key that has a value that matches the stringflatten( array): returns an array that is no longer nestedhead(array): returns the first object of an arrayletterPositions(string ): returns an object of arrays containing the positions of all the characters in the inputted stringmap(object1 callback): maps a funciton to all the items in an arraytail(array ): returns everything except the first value of an arraytakeUntil(object1 callback): returns the array until the callback funciton parameters are metwithout(source items): returns an array with any items from a given list removed
description: Pratik Bassi's pratice lotide library
keywords: lotide, practice, clone, utilities
author: pratikbassi
version: 1.0.0
1.0.0
6 years ago