1.0.0 • Published 2 years ago
@willwadman/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 @username/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
: Assert function to compare arraysassertEquals
: Equals comparison functionassertObjectEquals
: assert function to compare objectseqArrays
: function to compare arrayseqObjects
: function to compare objectshead
: function to remove the first element of an arraytail
: function to prodcue all elemtns but the head of an arraymiddle
: Function to get at the middle of an arraycountLetters
: function that counts the letters in a stringcountOnly
: function that counts the values of keys in an objectfindKey
: function that will find the keys of an objectfindKeyByValue
: function that will find the value of a specific key in an objectletterPositions
: function that finds the character psotion of each letter a string contains and logs the result as an arraymap
: maps arraysreverse
: function that reverses stringstakeWhile
: functiont hat goes through an array and provides values until the declare "until" value is reachedwithout
: function that removes values from an array, these values are provided by a second array passed into the function
head, tail, middle, assertArraysEqual, assertEqual, eqArrays
1.0.0
2 years ago