1.0.0 • Published 5 years ago

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • function1(head): returns head of array
  • function2(tail): returns tail end of array
  • function3(middle): returns middle of array
  • function4(assertArraysEqual): verifies if 2 arrays are the same
  • function5(assertEquals): verifies if 2 values are the same
  • function6(countLetters): counts the how many of each letter are in a word
  • function7(assertObjectsEqual): verifies if 2 objects are the same
  • function8(eqArrays): compares 2 arrays and returns boolean
  • function9(eqObjects): compares 2 objects and returns boolean
  • function10(findKeyByValue): returns key with value input
  • function11(findKey): returns key based on a conditional input
  • function12(letterPositions): returns the index number(s) of a string
  • function13(map): returns an array modified by a callback function
  • function14(takeUntil): returns the array input up to the point indicated by the callback function
  • function15(without): returns array without the elements in the second parameter
  • function16(countOnly): return counts for a specific subset of those items when given a collection of an items