1.0.12 • Published 4 years ago
lotide-by-kalkidan v1.0.12
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 @kali.taye/lotide
Require it:
const _ = require('@kali.taye/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head()
: returns the first element in an arraytail()
: returns the last element in an arraymiddle()
: returns the middle element in an arraycountLetters()
: counts a letter in a given wordscountOnly()
: count items in an arrayeqArrays()
: compares and returns true or false for two arrayseqObjects()
: compares and returns true or false for two objectsfindKey()
: returns an element from an object based on passed conditionfindKeyByValue()
: compares and returns a value from an object based on a key valueletterPositions()
: loops through a word and returns posion of a letter based of given conditionmap()
: loops through an array of words and returns the first letter of the wordstakeUntil()
: loops through an array until a condition is metwithout()
: takes out an element form an array.
1.0.12
4 years ago