1.0.0 • Published 5 years ago
@jhuot/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 @jhuot/lotide
Require it:
const _ = require('@username/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertEqual: Equality checkassertArraysEqual: Are two arrays equalassertObjectsEqual: Are two objects equalhead: Take first value out of arraytail: Take all but first value of arraycountLetters: count how many given letters in a stringcountOnly: cound only given values from a listeqObjects: Are objects equaleqArrays: Are arrays equalletterPositions: Map letters in string to indexfindKey: Find a given key in objectfindByKeyValue: Find property in object by valuemap: Map an existing array to new array with a functionmiddle: Find the middle values in an arraytakeUntil: Take values in array until given parameterwithout: Take values in array minus given parameter
1.0.0
5 years ago