1.0.0 • Published 3 years ago
@neale/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 @neale/lotide
Require it:
const _ = require('@neale/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual
: function that asserts if two arrays are equalassertEqual
: function that asserts if two given values are equalassertObjectsEqual
: function that asserts if two objects are equalcountLetters
: function that returns a count of each letter in a stringcountOnly
: function that returns a count of a specified itemeqArrays
: function that checks if two arrays are equaleqObjects
: function that checks if two objects are equalfindKey
: function that scans an object and returns a key for which the given value is truthyfindKeyByValue
: function that searches for a key in an object that corresponds to the given valueflatten
: function that removes arrays within arrays and returns one arrayhead
: function that returns the first element in an arrayindex
: list of all the functions in lotideletterPositions
: function that returns the positions of each letter in a stringmap
: function that creates a new array with the results of calling a provided function on every element in the called arraymiddle
: function that returns the middle element(s) of an arraytail
: function that returns every element except for the first in an arraytakeUntil
: function that iterates through an array until a given value is seenwithout
: function that removes elements from an array
1.0.0
3 years ago