1.0.0 • Published 4 years ago
@emonster/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 @Emonster97/lotide
Require it:
const _ = require('@Emonster97/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual(...): assertion tests to check if arrays are equal to each otherassertEqual(...): assertion tests to check if values are equal to each otherassertObjectsEqual(...): assertion tests to check if objects are equal to each othercountLetters(...): counts the number of times each letter appearscountOnly(...): counts the number of times a specific element appearseqArrays(...): compares arrayseqObjects(...): compares objectsfindKey(...): finds a key in an object by indexfindKeyByValue(...): finds a key in an object by valuehead(...): returns the start of an arrayletterPositions(...): gives you the index of each letter in a stringmap(...): maps the first letter of each value in an arraymiddle(...): returns the middle of an arraytail(...): returns the end of an arraytakeUntil(...): returns a string until it runs into a specified value/characterwithout(...): takes away specified items from an array
1.0.0
4 years ago