1.0.0 • Published 4 years ago
@ishmeet/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 @ishmeet/lotide
Require it:
const _ = require('@ishmeet/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head()
: displays the first element of the arraytail()
: displays the list of elements in the array leaving the first elementmiddle()
: displays the middle elements in an arraywithout()
: compares the array and returns the resultant array without the matching elementstakeUntil()
: displays array elements until any specified special charactermap()
: returns the array as per the condition specifiedletterPositions()
: checks for a particular letter positionfindKeyByValue()
: returns the key for the specified valuefindKey()
: returns the key for the specified conditioneqObjects()
:compares the arrays of objecteqArrays()
: compare the arrayscountOnly()
: iterate through the array and returns the count of the occurences of strings whose value is given trueCountLetters()
: counts the occurances of character
1.0.0
4 years ago