1.0.0 • Published 3 years ago

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • function1(assertArraysEqual): Compares two arrays and prints the results
  • function2(assertEqual): Compares two values (String or number) and prints the results
  • function3(assertObjectEqual): Compares two objects and prints the results
  • function4(countLetters): Turns a string into an object with keys containing the amount of letters in the string
  • function5(countOnly): Counts how many times a given element appears in an array and returns that number
  • function6(eqArrays): Compares two arrays returns true or false depending on if they are the same or not
  • function7(eqObjects): Compares two objects and returns true or false depending on it they are the same
  • function8(findKey): Returns the corresponding key when given a value
  • function9(head): Returns the first element in an array
  • function10(letterPositions): Takes a string and groups the letters into an array with each index number as the occurences
  • function11(middle): Returns the middle value(s) of a given array
  • function12(tail): Returns a new array with everything but the first element of a given array
  • function13(takeUntil): Receives an array and returns a new array with the correct values from the callback
  • function14(without): Removes a specified item from a given list