1.0.0 • Published 3 years ago

@moonrise8637/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 @moonrise8637lotide

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • head: retrieves the beginning index of an array
  • tail: retrieves every index of an array excluding the first index
  • middle: retrieves the middle index/indices of an array
  • assertEqual: asserts whether two values are equal
  • eqArrays: assesses whether two arrays are equal
  • assertArraysEqual: asserts whether two arrays are equal
  • without: returns a new array with removed items specified in a function
  • takeUntil: returns a new array until a specific condition is matched in a function
  • map: returns a new of array, changed by function applied to every index of the original array
  • without: returns a new array with removed items specified in a function
  • takeUntil: returns a new array until a specific condition is matched in a function
  • map_new: returns a new of array, changed by function applied to every index of the original array
  • letterPositions: creates an object that specifies which position a letter(s) in a string is/were in
  • findKeyByValue: returns the key that the value which gets passed to the function is in
  • findKey: returns the key that matches a arguement given to a function call
  • countOnly: returns the number of a specific value, argued in the function call
  • countLetters: counts how many letters are given in a string
  • eqObjects: assessing whether two objects are equal
  • assertObjectsEqual: returns a string specifying whether two objects are equal