1.0.0 • Published 3 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 arrays
- assertEquals: Equals comparison function
- assertObjectEquals: assert function to compare objects
- eqArrays: function to compare arrays
- eqObjects: function to compare objects
- head: function to remove the first element of an array
- tail: function to prodcue all elemtns but the head of an array
- middle: Function to get at the middle of an array
- countLetters: function that counts the letters in a string
- countOnly: function that counts the values of keys in an object
- findKey: function that will find the keys of an object
- findKeyByValue: function that will find the value of a specific key in an object
- letterPositions: function that finds the character psotion of each letter a string contains and logs the result as an array
- map: maps arrays
- reverse: function that reverses strings
- takeWhile: functiont hat goes through an array and provides values until the declare "until" value is reached
- without: 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
3 years ago