1.0.0 • Published 2 years ago

jasonram2022 v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 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 @jasonram2022/lotide

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • assertArraysEqual : Console logs two comparable arrays
  • assertEqual : Console logs two comparable values
  • assertObjectsEqual: Console logs two comparable objects
  • countLetters : Counts the amount of letters in a string
  • eqArrays : Checks if two arrays are equal
  • eqObjects : Checks if two objects are equal
  • findKey : Finds the key of an object
  • findKeyByValue : Finds a key based on an input value
  • head : Returns first index item of an array
  • lettersPositions : Returns the index of letters in a string
  • map : Holds a Key and Value pair
  • middle : Finds the middle value of an array
  • tail : Returns all values after the first index
  • takeUntil : Returns all values until a given value
  • without : Returns an array minus the array given