1.0.0 • Published 3 years ago
@isaac047/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 @isaac047/lotide
Require it:
const _ = require('@isaac047/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual
: asserts if two arrays are exact matchassertEqual
: checks if two given data are exact matchassertObjectsEqual
: asserts if two objects are exact matchcountLetters
: returns an object with count of each letter in a stringcountOnly
: returns an object with count of given item in an objecteqArrays
: checks if two arrays are exact matchfindKey
: finds a key that has a value equal to the return of a callback passedfindKeyByValue
: finds a key that has a value equal to a value passedhead
: returns the first value of an arrayletterPosition
: returns an object with letters in a string and their indexmap
: itterates through an array and returns an array of values that are returned from a callbackmiddle
: returns the middle element of an arraytail
: returns an array of all but the first element of a given arraytakeUntil
: returns an array containing values of a given array until the item that is equal to return of a callbackwithout
: returns an array without given values in a passed array
1.0.0
3 years ago