1.0.0 • Published 7 years ago
@jess-nl/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 @jess-nl/lotide
Require it:
const _ = require('@jess-nl/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Version:
1.0.0
Author:
Jess Noriega-Lessard jnoriegaless@gmail.com
Documentation
The following functions are currently implemented:
assertArraysEqual(arrayOne, arrayTwo): Verifies if two arrays are equalassertEqual(actual, expected): Verifies if two strings are equaleqObjects(object1, object2): Verifies if two objects are equaleqArrays(arrayOne, arrayTwo): Verifies if two arrays are the sameassertObjectsEqual(actual, expected): Verifies if two objects are the sameeqObjects(object1, object2): Verifies if two objects are the samefindKey(list, callback): Find key of objectflatten(arr): Create non-nested array with given arrayhead(element, elementTwo): First value of arraysayHelloTo(): descriptionmap(array, callback): descriptionmiddle(array): Middle value of arraytail(element, elementTwo): Last value of arraytakeUntil(array, callback): Takes values until callback is achievedwithout(firstArray, itemsToRemove): Remove given value from arrayindex: IndexfindKeyByValue(listOfGenres, valueOfGenre): Remove given key by valueletterPositions(sentence): Index position of given lettercountOnly(allItems, itemsToCount): Count given names in arraycountLetters((letters): Count letters in string
1.0.0
7 years ago