1.0.0 • Published 3 years ago
@roshan0926/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 @roshan0926/lotide
Require it:
const _ = require('@roshan0926/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head
: function that returns the first element of an arraytail
: function that returns all the elements excliding the last of an arraymiddle
: function that returns the middle value of an array (middle 2 if array has an even number of elements)countLetters
: function that returns the count of the letters in a stringcountOnly
: function that counts only the perscribed letterseqArrays
: function that compares two arrayseqObjects
: function that compares two objectsfindKeyByValue
: function that returns a value based on the key it is asigned to search forfindKey
: function that returns the key values of an objectflatten
: function that returns a single array for nested arraysletterPositions
: function that returns the index of a letter asinged from within a stringmap
: function that creates an array with the results of a seperate array through a callingwithout
: function that removes perscribed elements from an arraytakeUntil
: function that returns the inputted array until the designated index
1.0.0
3 years ago