1.0.0 • Published 3 years ago

@siriusll/lotide 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 @username/lotide

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • function1(head): returns value of first element in an array
  • function2(tail): returns a new array with everything except the first element
  • function3(middle): returns the middle element value of an array, if even 2 middle values if odd 1 middle value if 1 or 2 characters empty array
  • function4(assertArraysEqual): returns true of false whether 2 arrays are equal
  • function5(assertEqual): returns true or false if two values are equal
  • function6(assertObjectsEqual)returns true or false if two objects are equal
  • function7(countLetters)returns number of letters in a string
  • function8(eqArrays)returns true or false if two arrays are equal
  • function9(eqObjects)returns true of false if two objects are equal
  • function10(findKey)returns a key when provided a condition
  • function11(findKeyByValue)returns a key when provided a key value
  • function12(letterPositions)returns the positions of each letter in an array
  • function13(takeUntil)returns an new array with the end sliced off starting from a sepcified start point
  • finction14(without)returns a new array without a secified element
1.0.0

3 years ago