@oabdulra/lotide v1.0.2
Lighthouse Labs Lotide Project
This project is based on the Lodash library and is essentially a reimagined version of the Lodash library, in a simpler format.
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 @oabdulra/lotide
Require it:
const _ = require('@oabdulra/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
Below is a list of functions and what they do :
countLetters
: counts the amount of letters in a stringcountOnly
: Looks through an object and counts how many instances of a property appeareqArrays
: compares 2 arrays to see if they are equaleqObjects
: compares 2 objects to see if they are equalfindKey
: looks through an object with a property and returns that property's keyfindKeyByValue
: looks through an object by searching for the value and returning the keyflatten
: turns a multdimensional array into a flat, 1 dimensional arrayhead
: finds and returns the head of an arrayindex
: list of all functions in the lotide library, can be exportedletterPositions
: given a letter, it returns the position(s) of said letter in a stringmap
: maps and returns the start of strings , etcmiddle
: returns the middle of a given arraytail
: returns the end or tail of a given arraytakeUntil
: Takes in an array and a point to stop, and returns a new array with everything until the stop pointwithout
: takes in an array and removes elements not needed, and returns a new array with elements removedassertEqual
: Checks to see if 2 passthroughs are equalassertArraysEqual
: Check to see if 2 array are equalassertObjectsEqual
: Checks to see if 2 objects are the same