@cjhayes/lotide
v1.0.0
Published
A set of tools using mocha/chai to implement and test various oft-used functions
Downloads
4
Readme
#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
Usage
Install it:
'npm install @the1andonlycj/lotide'
Require it:
const _ = require('@the1andonlycj/lotide');'
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]`
Documentation
The following functions are currently implemented:
head(array)
: returns the first element of the arraytail(array)
: returns everything but the first element of the array (the "tail")middle(array)
: returns the middle number in an array with an odd number of elements or the two middle numbers in an array that has an even number of elements.