1.0.0 • Published 1 year ago

@lpdancona/lotide v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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 @lpdancona/lotide

Require it:

const _ = require('@lpdancona/lotide');

Call it:

const results = _.tail([1, 2, 3]) // => [2, 3]

Documentation

The following functions are currently implemented:

  • function1(assertArraysEqual): compares actual and expected arrays
  • function2(assertEqual): compares actual to expected
  • function3(assertObjectsEqual): compares objects
  • function4(countLetters): counts the letters of an string
  • function5(countLetters): counts the letters of an string
  • function6(countOnly): it only counts an specific item
  • function7(countOnly): it only counts an specific item
  • function8(eqArrays): compares two arrays and returns true or false
  • function9(eqArrays): compares two objects and returns true or false
  • function10(findKey): finds specific key in a object
  • function11(findKeyByValue): finds specific key in a object using the value
  • function12(head): finds the first item of an array
  • function13(letterPositions): tells the index of an letter in a array
  • function14(map): creates a new array populated with the results of calling a provided function on every element in the calling array
  • function15(middle): finds the items of the middle of an array
  • function16(middle): finds the items of the middle of an array
  • function17(tail): populates a new array with all the items of an array except the first
  • function18(takeUntil): it will push items to an array until condition is satisfied
  • function19(without): returns first argument without the second argument
1.0.0

1 year ago