1.0.0 • Published 4 years ago
@carmenk/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 @carmenk/lotide
Require it:
const _ = require('@carmenk/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(head): function that return the first element from the arrayfunction2(tail): function that return elements from the array expect the first elementfunction3(middle): function that return the middle element from the arrayfunction4(map): function that creates a new array which is the results of callback function on every element in an array.function5(findKey): function that return the first key for which the callback returns a truthy valuefunction6(findKeyByValue): function that return a key on an object where its value matches a given valuefunction7(countOnly): function that return counts for a specific subset of those itemsfunction8(countLetters): function that return count of the specific lettersfunction9(letterPositions): function that return the index of the specific letterfunction10(takeUntil):function that creates a slice of array.Elements are taken until the given callback elementsfunction11(without): function that remove items from an arrayfunction12(eqArrays): function that compare equality of two arraysfunction13(eqObjects): function that compare equality of two objectsfunction14(asserEqual): function that asser if two inputs are equalfunction15(assertArraysEqual): function that asser if two arrays are equalfunction16(assertObjectsEqual): function that asser if two objects are equal
1.0.0
4 years ago