1.0.0 • Published 3 years ago

@cookie-cpu/lotide v1.0.0

Weekly downloads
41
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 @cookie-cpu/lotide

Require it:

const _ = require('@cookie-cpu/lotide');

Call it:

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

Documentation

The following functions are currently implemented:

  • eqArrays(): Compares 2 arrays and returns true if equal
  • eqObjects(): Compares 2 objects and returns true if equal
  • countLetters(): Takes in a string and returns an object listing each letters occurence
  • findKey(): Searches an object for a key using a callback function
  • findKeyByValue(): Searches an object and returns the key based on the given value
  • head(): Takes an array and returns the first element of the array
  • middle(): Takes an array and returns the values in the middle index of the array
  • tail(): Takes an array and splits the first element from the rest
  • without(): Takes an array and a list of elements to remove and iterates through the array removing those items
  • function1(...): description
  • function2(...): description
  • function3(...): description