1.0.0 • Published 3 years ago

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

Require it:

const _ = require('methujan/lotide');

Call it:

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

Documentation

The following functions are currently implemented:

  • function1(assertArraysEqual): Checks if arrays are equal
  • function2(assertEqual): Checks if two values are equal
  • function3(assertObjectsEqual): Checks if two objects are equal
  • function4(countLetters): Counts the frequency of letters in a string
  • function5(countOnly): Counts given item to count
  • function6(eqArray): Returns true if both arrays have identical values
  • function7(eqObjects): Returns true if both objects have identical keys with identical values
  • function8(findKey): Finds key with callback function
  • function9(findKeyByValue): Finds key with given value
  • function10(head): Returns first index of an array
  • function11(index): Index of Lotide
  • function12(letterPositions): Keeps a object with the position of each letter in the sentence
  • function13(map): Maps value given callback function
  • function14(middle): Returns middle values
  • function15(tail): Returns values after the first element
  • function16(takeUntil): Takes elements from an array until the condition is met by the callback function
  • function17(without): Remove given items from array