2.0.0 • Published 3 years ago

@miguelangel9/lotide v2.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 @miguelangel9/lotide

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • map: function map to call the index 0 from each element in an array.
  • head: function head to call the head element from an array.
  • tail: function tail to call the tail from an array.
  • middle: function to call the middle from an array.
  • findKey: function to find the key in an object.
  • without: function to return an Array without a specific element.
  • eqArrays: function to compare two arrays.
  • eqObjects: function to compare two objects.
  • countOnly: function to count only specific elements from an object.
  • takeUntil: function to take until an especific element from an array.
  • countLetters: function to count the letters from a string.
  • assertEqual: function to compare the actual and the expected solution.
  • findKeyByValue: function to found the key in an object by the value.
  • letterPositions: function to found the position of a letter in an element.
  • assertArraysEqual: function to compare two arrays.
  • assertObjectsEqual: function to compare two objects.