1.0.2 • Published 10 months ago

@mehwiqb/lotide v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months 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 @mehwiqb/lotide

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • head: Finds the head of an array passed as an argument
  • tail: Finds the tail of an array passed as an argument
  • middle: Finds the middle of an array passed as an argument assertEqual: Compare two values passed as arguments assertArraysEqual: Compare two arrays passed as arguments eqArrays: Compares two arrays assertObjectsEqual: Compare two objects passed as arguments eqObjects: Compare two objects passed as arguments countLetters: Returns number of letters in a string countOnly : Returns count findKey: Returns key findKeyByValue: Returns key for the value passed flatten: Flattens an array passed letterPositions: Finds position of each letter in a string passed map: maps array of strings without: returns array without a given element takeUntil: returns array with elements until the condition passed in callback

Instruction

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago