1.0.0 • Published 2 years ago

@mruhl14/lotide v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

lotide

Author: @mruhl14

Version 1.0.0

Description: "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 @mruhl14/lotide

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • function1(head): removes tail in array
  • function2(tail): removes head in array
  • function3(middle): produces middle of array
  • function1(asserteqObject): compares 2 objects
  • function2(assertArraysEqual): compares 2 arrays
  • function3(countLetters): returns letter occurrences
  • function1(countOnly): records occurences in array if true value in object
  • function2(eqArrays): compares 2 arrays
  • function3(eqObjects): compares 2 objects
  • function1(findKey): returns key in object
  • function2(findKeybyValue): returns key in object based on its value
  • function3(letterPositions): returns positions of element in a string.
  • function1(map): returns number of letters in words in a string
  • function2(without): return array without input.