1.0.1 • Published 5 years ago
@rkang626/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 @rkang626/lotide
Require it:
const _ = require('@username/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(...): assertion for two arraysassertEqual(...): assertion for two valuesassertObjectsEqual(...): assertion for two objectshead(...): returns the first item in an arraytail(...): returns the array without the first itemmiddle(...): returns the middle item(s) of the arraycountLetters(...): returns an object with the count of each letter in a stringcountOnly(...): returns an object with the count of specified items in an arrayeqArrays(...): checks if two arrays are equaleqObjects(...): checks if two objects are equalfindKey(...): returns the first key of an object where the value meets a provided conditionfindKeyByValue(...): returns the first key of an object where the value is equal to an inputflatten(...): flatten a nested arrayletterPositions(...): returns an object with the index position of all letters in a stringmap(...): apply a function to every item in an arraytakeUntil(...): returns a new array with all items until the provided condition is metwithout(...): returns a new array with specified items removed