1.0.0 • Published 3 years ago
@nickaz123/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 Nick Azurin as part of my learnings at Lighthouse Labs.
Usage
Install it:
npm install @nickaz123/lotide
Require it:
const _ = require('nickaz123/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
assertArraysEqual
: Checks to see if arrays are equalassertEqual
: simple equals test, input your results and your expectedcountLetters
: returns a count of all letters in a stringcountOnly
: counts how many times a name appears in an objecteqArrays
: Similar to assertArraysEqual, without the assertioneqObjects
: Checks two objects equalityeqObjectsRec
: Same as function above just with recursioneqRecArrays.js
: Equal arrays comparison with recursionfindKey
: Finds a key in an arrayfindKeyByValue
: Same as above, just given a valueflatten
: Take in an array of arrays and returns a single array with all elementshead
: returns the first element of an arrayletterPositions
: returns the indecies of all letters in an arraymap
: take an array of words and returns an array with all their first lettermiddle
: returns an array of all middle values in an arraypiglatin
: takes in a string and converts it to pig latin.
1.0.0
3 years ago