1.0.0 • Published 3 years ago

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • assertArraysEqual: returns true of false if arrays are equal
  • assertEqual: returns true if an actual arugment is the same as expected
  • assertObjectsEqual: function for returning true if two objects equal
  • countLetters: counts the reoccurence of letters in a string
  • countOnly: returns specific items to count from total items
  • eqArrays: returns true if two arrays are equal
  • eqObjects: returns true if two objects are equal
  • findKey: returns the key of an object
  • findKeyByValue: returns the specific key of a given callback value
  • head: returns the first element of an array
  • letterPositions: returns the index of letters in an string
  • map: creates a new array based on a callback function
  • middle: finds the middle element of an array
  • tail: returns the last element of an array
  • takeUntil: based on callback will return the elements of an array until callback is filled
  • without: returns new array based on set of elements to remove