1.0.2 • Published 5 years ago

@vtranduc/lotide v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
5 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 @vtranduc/lotide

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • head(array): This gets the first value of array
  • tail(array): This returns the array except the first value.
  • middle(array): Gets middle val
  • assertArraysEqual(array1, array2): assert Arrays are equal
  • assertEqual(value1, value2): assert that values are equal
  • assertObjectsEqual(object1, object2): asserts objects are equal
  • countLetters(someString): count letters
  • countOnly(someString): only count letters
  • eqArrays(array1, array2): checks if arrays are equal
  • eqObjects(object1, object2): checks if obejcts are equal
  • findKey(array): find the key
  • findKeyByValue(array): find the key by value
  • flatten(array): flattens out
  • letterPositions(someString): letter's position
  • map(array): mapping of each element in array
  • takeUntil(array): takes until some condition is met
  • without(array): without some stuff
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago