1.0.0 • Published 5 years ago
@unfamousdyson/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 @hatheadninja/lotide
Require it:
const _ = require('@username/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArrayEqual.js
: assertion that 2 arrays are equalassertEqual.js
: assertion that two primitive varials are equalassertObjectsEqual.j
: assertion that 2 objects are equalcountLetters.js
: counts letters in a stringcountOnly.js
: return an object containing counts of everythingeqArrays.js
: evaluate the equivalence of arrayseqObjects2.js
: evaluate the equivalence of objectseqObjects.js
: evaluate the equivalence of objectsfindKeyByValue.js
: find the key in an array when provided the corresponding valuefindKey.js
: find the key in an arrayhead.js
: returns the first element in an arrayletterPositions.js
: outputs the index position of letters in a stringmap.js
: Use map to return array if the first character of of every stringmiddle.js
: return the middle element of an arrayreverse.js
: reverse a stringswapper.js
: swap 2 elements in an arraytail.js
: returns the last element in an arraytakeUntil.js
: push each element to arraywithout.js
: select items from an array excluding specific items.
1.0.0
5 years ago