1.0.0 • Published 2 years ago

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • assertArraysEqual: manually created assertion function that compares arrays and checks actual values against expected and returns a pass or fail
  • assertEqual: manually created assertion function that checks actual values against expected and returns a pass or fail
  • assertObjectsEqual: manually created assertion check for Objects
  • countLetters: function that counts the numbers of letters given a string
  • countOnly: function that goes through an array and references an object specifying what to count
  • eqArrays: function that takes two arrays and determines if they share identical elements/values
  • eqObjects: function that takes two objects and determines if they share identical key/value pairs
  • findKey: function that takes an object and a callback and returns the property given a key. If multiple entries exist it returns the first
  • findKeyByValue: function that takes a value and returns the key where it is stored
  • head: returns the first element of an array
  • index: importing/exporting head/middle/tail functions
  • iteratingOverObjects: assignment function that shows how to iterate through objects
  • letterPositions: takes a string and returns an object logging each letter by its own key
  • map: assignment function
  • middle: function that takes an array and returns the middle element. if the array stores an even amount of elements, it returns the middle two
  • objectsNew: assignment function that taught us on object manipulation
  • reverse: stretch activity function that takes a string from the terminal and returns a reverse string (hello to elloh)
  • reversecopy: second attempt at reversing a string.
  • tail: function that returns the last element of an array
  • takeUntil: function that itereates through an array and returns a new array of the same elements until the callback is invoked within the array
  • without: function that takes an array and returns only the values specified
1.0.0

2 years ago