@nicholask/lowtide
v1.0.0
Published
a educationally motivated copy of the lodash library
Downloads
1
Readme
Lowtide
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 nicholask/lowtide
Require it:
const _ = require('nicholas/lowtide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(...)
: descriptionfunction2(...)
: descriptionfunction3(...)
: descriptionhead
: returns the first element of array passed intail
: returns all but the first element of an array passed inmiddle
: returns middle element of array passed in, if array length is an even number, then it returns the two middle elements, as an arrayassertArraysEqual
: returns assertion statement for two arraysassertEqual
: returns an assertion statement of two valuesassertObjectsEqual
: checks to deeply determine if two objects have the exact key:value pairscountLetters
: returns number of letters in string passed incountOnly
: returns count of selected itemseqArrays
: returns true if two arrays are equaleqObjects
: checks if objects are equalfindKey
: returns key value that passes conditionalfindKeyByValue
: returns key name by value passed inletterPositions
: returns letter positonsmap
: modifies input array by a callbacktakeUntil
: returns all elements of an array until input value is satisfiedwithout
: returns an array without elements as put in arguement