1.0.1 • Published 1 year ago
@oliverdanger/lotide v1.0.1
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 @oliverdanger/lotide
Require it:
const _ = require('@oliverdanger/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
head
: returns first item in arraytail
: returns all but first item in arraymiddle
: returns middle item or two items of array if array is at least 3 longeqArrays
: returns true if two arrays are equalassertEqual
: asserts if two values are equal and returns trueassertArraysEqual
: asserts if two arrays are equala nd returns true