@moonrise8637/lotide
v1.0.0
Published
A miniclone of the lodash library used exclusively for learning purposes
Downloads
2
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 @moonrise8637lotide
Require it:
const _ = require('@moonrise8637/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head
: retrieves the beginning index of an arraytail
: retrieves every index of an array excluding the first indexmiddle
: retrieves the middle index/indices of an arrayassertEqual
: asserts whether two values are equaleqArrays
: assesses whether two arrays are equalassertArraysEqual
: asserts whether two arrays are equalwithout
: returns a new array with removed items specified in a functiontakeUntil
: returns a new array until a specific condition is matched in a functionmap
: returns a new of array, changed by function applied to every index of the original arraywithout
: returns a new array with removed items specified in a functiontakeUntil
: returns a new array until a specific condition is matched in a functionmap_new
: returns a new of array, changed by function applied to every index of the original arrayletterPositions
: creates an object that specifies which position a letter(s) in a string is/were infindKeyByValue
: returns the key that the value which gets passed to the function is infindKey
: returns the key that matches a arguement given to a function callcountOnly
: returns the number of a specific value, argued in the function callcountLetters
: counts how many letters are given in a stringeqObjects
: assessing whether two objects are equalassertObjectsEqual
: returns a string specifying whether two objects are equal