1.0.0 • Published 3 years ago

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • function1(assertArraysEqual): Asserts if two arrays are equal
  • function2(assertEqual): Asserts if two values are equal
  • function3(assertObjectsEqual):Asserts if two objects are equal
  • function4(countLetters): Countsletters are in a string
  • function5(countOnly): Counts how many times a value appears in an array
  • function6(eqArrays): compares two arrays
  • function7(findKeyByValue): given an object, will find the key by the value.
  • function8(findKey): Find's the key of an object given the value.
  • function9(head): Removes the first item in an array
  • function10(letterPositions): Given a string as argument, lists the index position.
  • function11(map): map function, grabes the first letter of a word in a string.
  • function12(middle): finds the middle element of an array
  • function13(tail): finds the last element of an array
  • function14(takeUntil): takes until a given point in an array
  • function15(without):removes elements from an array