1.0.0 • Published 6 years ago
@scottappleton/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 @scottappleton/lotide
Require it:
const _ = require('@scottappleton/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual
: check to see if two arrays are equalassertEqual
: check the equality of two given valuesassertObjectsEqual
: check to see if two obcountLetters
: countLetters in a stringcountOnly
: Given an array of items. Only count occurences of given items.eqArrays
: check the equality of two given arrayseqObjects
: check to see if two objects are equalfindKey
: return keyfindKeyByValue
: return key of given value in objectflatten
: returns a flattened arrayhead
: returns the head of an arrayindex.js
: export all functions in an objectletterPositions
: returns the indexes of all letters in a stringmap
: copies the map lodash operationmiddle
: returns the middle of an array in an arraytail
: returns the tail of an arraytakeUntil
: iterate through an array until a given callbackfuntion returns falsewithout
: return an array without given values
1.0.0
6 years ago