@giroly/lotide

1.0.0 • Public • Published

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • assertArraysEqual(arrayOne, arrayTwo): Asserts whether two Arrays are Equal
  • assertEqual(actual, expected): Asserts whether two strings are Equal
  • assertObjectsEqual(object1, object2): Asserts whether two Objects are Equal
  • countLetters(string): Counts letters in a string
  • countOnly(allItems, itemsToCount): Count given strings from a List (Example: Names of a List)
  • eqArrays(arrayOne, arrayTwo): Checks if two given arrays are exactly the same
  • eqObjects(object1, object2): Checks if two given objects are exactly the same
  • findKey(object, callback): Find a given Key from an object
  • findKeyByValue(object, value): Find a given Key by Value
  • flatten(arrayThick): Returns a non-nested Array
  • head(element, elementTwo): Returns the first value of an array
  • index: Function Index
  • letterPositions(sentence): Return index position of a given letter
  • middle(array): Return middle value of an Array
  • tail(element, elementTwo): Returns the last value of an array
  • takeUntil(array, callback): Takes values until Callback is Fulfilled
  • without(sourceArray, toRemove): Removes given value from an Array

Readme

Keywords

none

Package Sidebar

Install

npm i @giroly/lotide

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

19 kB

Total Files

27

Last publish

Collaborators

  • giroly