1.0.1 • Published 2 years ago

@nicolecmaclean/lotide v1.0.1

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

lotide

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

Contents

  • Assert Equal : Checks if two values are the same or not
  • Head : Returns value of first index of array
  • Tail : Returns array after index 0.
  • Assert Equal Array : Checks values of arrays match
  • Assert Equal Array || : Checks if two arrays are the same or not
  • Without : Retunrs array minus given input value
  • Flatten : Returns array of values that do not contain any arrays, with an array input with array values
  • Middle : Returns value of index in middle if an array - 1 value if array.length even, 2 if not.
  • Count Only : Returns a count of a stated value
  • Count Letters : Returns a count of each letter in a string
  • Letter Positions : Returns first index of stated letter
  • Find Key By Value : Returns key of first value to match stated value
  • Equal Objects : Checks if two objects match
  • Assert Objects Equal : Checks if two objects return the same value or not
  • Map : Returns array after callback function has been executed on each element of inputed array
  • Take Until : Returns array until input value is the value of the element
  • Find Key : Returns value of stated key
  • Index : File containing all requirments and exported functions in an object
1.0.1

2 years ago

1.0.0

2 years ago