1.0.0 • Published 2 years ago

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • head,(determine the first index)
  • tail,(determine the last index)
  • middle,(determine the middle index or indexes)
  • assertArraysEqual,(determine if two arrays are equal)
  • assertEqual,(determine if two elements are equal)
  • eqObjects,(used in determining if two objects are equal)
  • assertObjectsEqual,(determine if two objects are equal)
  • countLetters,(count the ammount of all letters individually)
  • eqArrays,(used in determining if two arrays are equal)
  • findKey,(used to find key)
  • flatten,(flatten all arrays into one array)
  • letterPositions,(determing the index value of each letter)
  • findKeyByValue,(find key by value given)
  • map,(create new array with every element called by the a given element)
  • countOnly,(count only certain elements)
  • without,(print array without a given element)