1.0.6 • Published 2 years ago

@leventbk/lotide v1.0.6

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

Lotide :dizzy:

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • assertArraysEqual: assertion function for arrays
  • assertEqual: assertion function for primitive values
  • assertObjectsEqual: assertion function for objects
  • countLetters: counts how many of each letter there is in a string
  • countOnly: counts only specific values in an array
  • eqArrays: comparison function for arrays
  • eqObjects: comparison function for objects
  • findKey: finds the key in an object whose value matches a certain criteria
  • findKeyByValue: finds the key in an object by its value
  • flatten: flattens a nested array (only for 2-level arrays)
  • head: returns the first value in an array
  • letterPositions: returns the positions of letters in a string
  • map: a clone of the Array.prototype.map method
  • middle: returns the middle element(s) of an array
  • tail: returns all the values except the first one of an array
  • takeUntil: takes elements of an array until a condition becomes true
  • without: returns a copy of an array without certain elements
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago