1.0.0 • Published 5 years ago

@jennifer.g/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 @jennifer.g/lotide

Require it:

const _ = require('@jennifer.g/lotide');

Call it:

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

Documentation

The following functions are currently implemented:

  • assertArraysEqual: checks to see if 2 arrays are equal
  • assertEqual: checks to see if the output matches the expected output
  • assertObjectsEqual: checks to see if 2 objects are equal
  • countLetters: counts the letters in a string
  • countOnly: counts the number of times a given input occurs
  • eqArrays: returns true if 2 arrays are equal
  • eqObjects: returns true if 2 objects are equal
  • findKey: returns the key
  • findKeyByValue: returns a key name given the value
  • flatten: returns one array from an array of arrays
  • head: returns the first element of the input
  • index: file to export all functions
  • letterPositions: returns the index location of a given letter
  • map: reutns an array based on the callback function
  • middle: returns the middle of an array, array must be at least 3 elements
  • tail: returns the end of an input, everything except the head
  • takeUntil: returns the begininning of an array until it reaches a truthy value - based on callback
  • without: returns an array without a given element