@delnir/lotide
v1.0.2
Published
my first Lighthouse Labs project
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 @delnir/lotide
Require it:
const _ = require('@delnir/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(asserArraysEqual): assertions for two exactly same arraysfunction2(asserEqual): assertions for two exactly same primitivefunction3(assertObjectsEqual): assertions for two exactly same objectsfunction4(countLetters): counting how many letters in a stringfunction5(countOnly): counting how many given element(s) in a string/ arrayfunction6(eqArrays): checking if two arrays are the samefunction7(eqObjects): checking if two objects are the samefunction8(findKey): finding the object's key of given valuefunction9(findKeyByValue): finding the obejct's key of given stringfunction10(flatten): making nested arrays into one arrayfunction11(head): finding the first element of an arrayfunction12(index): main index file for the whole projectfunction13(letterPositions): finding the array's indices of a given letterfunction14(map): modifying every element in an array with given callback functionfunction15(middle): finding the middle part of an array (excluding first and last element from original array)function16(tail): finding the last element of the arrayfunction17(takeUntil): excluding certain elements that meet the given conditions from an arrayfunction18(without): excluding certain given element(s) from an array
