@sina77/lotide
v1.0.1
Published
Lotide is a simple package includes some assertion functions similar to Lodash and some functions published by a student
Downloads
3
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 @sina77/lotide
Require it:
const _ = require('@sina77/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(assertArraysEqual)
: to compare two arrays for equality based on the eqArrays.jsfunction2(assertEqual)
: only a function to compare equalityfunction3(asserObjectEqual)
: to compare two objects for equalityfunction3(countLetters)
: A function that counts all the letters in a textfunction3(countOnly)
: take in a collection of items and return counts for a specific subset of those itemsfunction3(eqArrays)
: To compare the equality of two arrays based on the correctness required in the functionfunction3(eqObject)
: to compare two objects for equalityfunction3(findKey)
: return the first key with the requested valuefunction3(findKeyByValue)
: it will find a key in an object by iterating through valuesfunction3(flatten)
: for getting an Array include different datas and output a flat Arrayfunction3(head)
: a function to return the very first item of an arrayfunction3(letterPosition)
: it will return an object includs array of positions of letters in a sentencefunction3(map)
: only like mapfunction3(middle)
: to return best middle item(s) of an arrayfunction3(tail)
: a function to return all items in an array but the very first onefunction3(takeUntil)
: it will return a part af Array from first to what is asked forfunction3(without)
: will compare two arrays and return a subArray