@kiko25/lotide
v1.0.1
Published
A list of functions created and published as part of my learnings at Lighthouse Labs
Downloads
7
Readme
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 kiko25/lotide
Require it:
const _ = require('kiko25/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual
: asserts whether two arrays are equalassertEqual
: asserts whether two values are equalassertObjectsEqual
: asserts whether two objects are equalcountLetters
: returns an object that lists the number of occurence of the letters in a stringcountOnly
: returns an object that lists how many times the specified value appeared in a given arrayeqArrays
: returns true if two arrays are equal and vice versaeqObjects
: returns true if two objects are equal and vice versafindKey
: returns the first matching key based on the callbackfindKeyByValue
: returns the first matching key based on the valueflatten
: transforms a nested array into a non-nested arrayhead
: returns the first element of an arrayletterPositions
: returns an object that lists the indeces of the letters of a given stringmap
: returns the array with value manipulated based on the callback functionmin
: returns the minimum value of an arraytail
: returns the array minus the first elementtakeUntil
: returns the array and stops when it meets the criteria specified in the callback functionwithout
: returns an array without the values specified