1.0.0 • Published 4 years ago
@ricardojbof/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 @username/lotide
Require it:
const _ = require('@ricardojbof/lotide');
Call it:
const results = _.tail([1, 2, 3]) // => [2, 3]
Documentation
The following functions are currently implemented:
function1(head,)
: Get first element of an array.function2(tail,)
: Get last element of an array.function3(middle,)
: Get middle element of an array.function4(assertArraysEqual,)
: Print if compared arrays are similar or not.function5(assertEqual,)
: Print if non-complex variables (numbers, strings, NaN, undefined) are similar or not.function6(assertObjectsEqual,)
: Compare objects.function7(countLetters,)
: Count number of letters.function8(countOnly,)
: Count specific value.function9(eqArrays,)
: Compare if objects are equal or not.function10(eqObjects,)
: Compare if objects are equal or not.function11(findKey,)
: Find key.function12findKeyByValue,)
: Fin key by value.function13(letterPositions,)
: Position of an element in a string.function14(map,)
: Transform all the elements of an array at the same time.function15(takeUntil,)
: Get elements of array by a defined element.function16(without)
: Get remaining array's elements after removing defined elements.
1.0.0
4 years ago