@javinlau/lotide
v1.0.0
Published
this is my lotide submission thats a tad later than anyone would have liked
Downloads
4
Readme
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 @javinlau/lotide
Require it:
const _ = require('@javinlau/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArraysEqual): confirm if two or more arrays compared are equal, if so return appropriate messagefunction2(assertEqual): confirm if two or more primitive values compared are equal, if so return appropriate messagefunction3(assertObjectsEqual): confirm if two or more objects compared are equal, return appropriate message for either orfunction4(countLetters): count letters in a string and return the numberfunction5(eqArrays): compare if two arrays are equal in length but not necessarily what the contents are containedfunction6(findKey): find the keys within an objectfunction7(findKeyByValue): search for approriate key within objectfunction8(flatten): take all values in the array, including other arrays, and flatten it out to one array onlyfunction9(head): return the first value in the arrayfunction10(letterPositions): confirm the position of specific letters using dot notation based on the specific 0 based number givenfunction11(map): take an array and callbacks as input and return a new array with transformed element, which is similar to .map methodfunction12(middle): provide the middle value in the array, if odd number of values in array then return 1x value, if even then return middle 2 valuesfunction13(tail): take an array and provide the last value in the arrayfunction14(takeUntil): take array and callback as input, and conduct loop until condition within callback is observed, return up to that value, and stop loopfunction15(without): take an array, tell what the callback what value i want to remove, then return the array without the specific value i wanted to remove
