1.0.0 • Published 5 years ago
@perigon/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 @periogn/lotide
Require it:
const _ = require('@perigon/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArrayEqual): Receive check condition ouput text depending if input is true of falsefunction2(assertEqual): Bacis comarison check is two input are equal, does not work on array expect if another method return each iteration seperatryfunction3(assertObjectEqual): Object comparaison tool that verbose a console.logfunction1(countLeters): Count the number of letter in a string, empty space count as letterfunction2(countOnly): Count the occurences of itemToCount in the input all Itemsfunction3(eqArray): Check if 2 arrays are equalsfunction1(eqObject): Basic check to see it 2 object are equalsfunction2(findKey): Return the element 'key' in a object where callback applied to this element is truefunction3(findKeyByValue): Return the genre 'Value' in a object where callback applied to this element is truefunction1(head): Return the first element of a string or and arrayfunction2(tail): Return everything exept the head of an inputfunction3(letterPositions): Return in witch key each letter in the sentence is foundfunction1(middle): Scan the input to find the middle element, if more than 5 and even output 2 elementsfunction2(map): Receive and array and a function, then it applay the function on each iteration inside the arrayfunction3(reverse): Return a reverse version of the inputfunction1(takeUntil): Return every iteration of an array until the callback return falsefunction2(without): Return a list where all the elements to filter out are not included
1.0.0
5 years ago