1.0.0 • Published 8 months ago
@onandrew/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 @onandrew/lotide
Require it:
const _ = require('@onandrew/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual.js(...)
: compares if two arrays are equal and returns message based on resultassertEqual.js(...)
: compares if two values are equalassertObjectsEqual.js(...)
: compares if two objects are equal and returns message based on resultcountLetters.js(...)
: counts the number of letters in a stringcountOnly.js(...)
: count items in array in objecteqArrays.js(...)
: compares if two arrays are equaleqObjects.js(...)
: compares if two objects are equalfindKey.js(...)
: find a key based on callback functionfindKeyByValue.js(...)
: find a key based on valueflatten.js(...)
: converts nested arrays into a single arrayhead.js(...)
: returns first value in arrayindex.js(...)
: index file for exporting modulesletterPositions.js(...)
: returns positions of a value in an arraymap.js(...)
: returns value in specific value for multiple items in arraymiddle.js(...)
: returns middle value(s) in arraytail.js(...)
: returns every value except the first in an arraytakeUntil.js(...)
: returns value in order in the array until specified parameterwithout.js(...)
: removes specific value from array and returns the rest
1.0.0
8 months ago