1.0.0 • Published 2 years ago

@dwayne-jagernauth/lotide v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 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 @dwayne-jagernauth/lotide

Require it:

const _ = require('@dwayne-jagernauth/lotide');

Call it:

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

Documentation

The following functions are currently implemented:

  • function1(assertArraysEqual.js): compares two arrays, displays message depending on if they are the same or differen
  • function2(assertEqual.js): asserton part of assertArraysEqual - assertArraysEqual depends on assertEqual
  • function3(assertObjectsEqual.js): compares objects and displays message depending if same or not, requires eqObjects.js
  • function4(countLetters.js): counts the letters but not the spaces in a phrase without punctuation
  • function5(eqArrays.js): compares two arrays to see if they are the same or not - required by assertArraysEqual.js
  • function6(eqObjects.js): compares to objects as above, requires eqArrays, is required by assertObjectsEqual
  • function7(findKey.js): declares the name of a key or not found if it is found in an object, takes in a callback function
  • function8(findKeyByValue.js): finds the name of a key in an object given the corresponding value
  • funciton9(head.js): returns the first element of an array
  • function10(letterPositions.js): returns an array of arrays with the letter position of different letters in an unpunctuated sentence
  • function11(map.js): returns the first letter of each word in an array
  • function12(middle.js): returns the middle items of arrays of length > 3, will return the middle two for arrays of even length
  • function13(tail.js): returns the elemtents of an array except the first element
  • function14(takeUntil.js): returns the elements of an array up to element returned by callback funtion
  • function15(without.js): removes given elements from an array