1.0.0 • Published 5 years ago

@jess-nl/lotide v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 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 @jess-nl/lotide

Require it:

const _ = require('@jess-nl/lotide');

Call it:

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

Version:

1.0.0

Author:

Jess Noriega-Lessard jnoriegaless@gmail.com

Documentation

The following functions are currently implemented:

  • assertArraysEqual(arrayOne, arrayTwo): Verifies if two arrays are equal
  • assertEqual(actual, expected): Verifies if two strings are equal
  • eqObjects(object1, object2): Verifies if two objects are equal
  • eqArrays(arrayOne, arrayTwo): Verifies if two arrays are the same
  • assertObjectsEqual(actual, expected): Verifies if two objects are the same
  • eqObjects(object1, object2): Verifies if two objects are the same
  • findKey(list, callback): Find key of object
  • flatten(arr): Create non-nested array with given array
  • head(element, elementTwo): First value of array
  • sayHelloTo(): description
  • map(array, callback): description
  • middle(array): Middle value of array
  • tail(element, elementTwo): Last value of array
  • takeUntil(array, callback): Takes values until callback is achieved
  • without(firstArray, itemsToRemove): Remove given value from array
  • index: Index
  • findKeyByValue(listOfGenres, valueOfGenre): Remove given key by value
  • letterPositions(sentence): Index position of given letter
  • countOnly(allItems, itemsToCount): Count given names in array
  • countLetters((letters): Count letters in string