1.0.1 • Published 3 years ago
@lmf950122/lotide v1.0.1
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 @lmf95122/lotide
Require it:
const _ = require('@lmf950122/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArrayEqual()
: assert arraysassertEqual()
: assert the inputsassertObjectsEqual()
: assert objectscountLetters()
: count letterscountOnly()
: count names in objectseqArrays()
: compare arrays are equal or noteqObjects()
: compare objects are equal or notfindKey()
: find the keyfindKeyByValue()
: find the key based on the valueflatten()
: flatten a nested arrayhead()
: return the head of an arrayletterPositions()
: find the letter position in the arrayloppyRefactor()
: console log numbers in certain range, and replace certain number which meet the requirementsmap()
: create a copy of input arraymiddle()
: returns the most middle element in the arraypigLatin()
: convert string into pigLatin formatreverse()
: reverse a stringtail()
: return the array without first elementtakeUntil()
: take the elements and return a new array until unexpected elementwithout()
: return a new array without unexpected element