1.0.0 • Published 4 years ago
@lord-proton/lotide v1.0.0
lotide
javascript library project
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 @lord-proton/lotide
Require it:
const _ = require('@lord-proton/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function head
: returns index0 element fm arrayfunction tail
: returns array with index0 element removedfunction middle
: returns midde element(s) from arrayfunction assertArraysEqual
: returns t/f for arr 1 === arr 2function countLetters
: counts all letters in a stringfunction countOnly
: counts specified items in array as directedfunction eqArrays
: determines if 2 arrays have same contentfunction eqObjects
: determines if 2 objects have same key:value pairsfunction findKey
: returns the keys contained in an objectfunction findKeyByValue
: returns the keys by using values in objectfunction letterPositions
: returns object giving index positions of each letterfunction takeUntil
: func pulls data from array until callback cond is metfunction without
: func removes array elements based on callback condition
1.0.0
4 years ago