1.0.0 • Published 3 years ago

@jgabriel88/lotide v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years 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 @jgabriel88/lotide

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • assertArraysEqual(): description
  • assertEqual(): description
  • assertObjectsEqual(): description
  • tail() : Function used to retrieve the fist element of an Array
  • middle() : Function used to retrieve the elemente in the middle of an Array
  • assertArraysEqual() : Function to assert if two Arrays are equal
  • assertEqual() : Function used to check if two Strings are equal
  • assertObjectsEqual() : Function used used to assert if two Objects are equal
  • countLetters() : Function used to count letter in a String
  • countOnly() : Function used to count how many times the same String or Numbers appears in an Array
  • eqArrays() : Function used to check if to Arrays are equal
  • eqObjects() : Function used used to check if two Objects are equal
  • findKey() : Function used to find a Value of an Object key
  • findKeyByValue() : Function used to finde a Object key by value
  • flatten() : Function used to dissolve a nested Array
  • letterPositions() : Function used to show in wich index a character is placed in a string
  • map() : Function used to iterate in an Array
  • takeUntil() : Function used to iterate in an Array untill the given value is found
  • without() : Function used to remove from an Array the given value.