1.0.0 • Published 4 years ago

@arsala1995/lotide v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 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 @arsala1995/lotide

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • function1(head): prints the head of array
  • function2(tail): prints everything except the first element in array
  • function3(middle): prints middle element in array
  • function3(assertEqual): checks if elements are equal
  • function3(eqArrays): checks if the items in arrays are equal
  • function3(assertArraysEqual): returns true if arrays are equal
  • function3(assertObjectsEqual): checks if the objects are equal
  • function3(countOnly): counts the elements
  • function3(findKey): looks for the key
  • function3(findKeyByValue): looks for the key using the value of the key
  • function3(letterPositions): searches for the position of the letter
  • function3(map): like a for function
  • function3(takeUntil): takes data until reaches the exception
  • function3(without): prints everything except the mentioned one