1.0.0 • Published 3 years ago

@odeliafinkel/lotide_new_odeliafinkel v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 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 @odeliafinkel/lotide_new_odeliafinkel

Require it:

const _ = require('@odeliafinkel/lotide_new_odeliafinkel');

Call it:

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

Documentation

The following functions are currently implemented:

  • assertEqual: function that looks for value equality
  • assertArraysEqual: function look for equality in arrays
  • assertObjectsEqual: function that looks for object equality
  • eqArrays: function that compares two arrays
  • head: function that gets the first element in an array
  • middle: function that returns the middle element of an array
  • tail: function that retrieves every element except the head (first element) of the array
  • findKey: function that looks through an object for the first key that the callback returns true
  • eqObjects: function that compares two objects
  • countLetters: function that return the count for letters of a given string
  • without: function that removes elements from the given array
  • countOnly: function that returns the count for specific part of string
  • findKeyByValue: function that searches for an object key where value matches the input value
  • letterPositions: function that returns all the indices in the string corresponding to the given location
  • map: function that creates a new array with the results of calling
  • takeUntil: function that returns a subset of the array
  • index: list of all the functions in an object