1.0.0 • Published 4 years ago
@hemar/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 @hemar/lotide
Require it:
const _ = require('@hemar/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual
: To check whether two arrays are equal or notassertEqual
: To check whether two parameters are equal or notassertObjectsEqual
: To check whether two objects are equal or notcountLetters
: To count each letters in a stringcountOnly
: To count specific items in an arrayeqArrays
: To return true or false comparing arrayseqObjects
: To check whether two objects are equal or notfindKey
: To find key of a specific valuefindKeyByValue
: search for a key on an object where its value matches a given valuehead
: To find first element or head of the arrayletterPositions
: returns an array corresponding to the positions of that letter in a stringmap
: Implements map functionmiddle
: To return the middle of an arraytail
: To return the elements other than the first element of an arraytakeUntil
: Take an array until a given condition is satisfied.without
: Return an array wihout the elements specified in another array
1.0.0
4 years ago