1.0.3 • Published 2 years ago

@jay1337/lotide v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 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:

  • head: Returns the first value in an array
  • middle: Returns the middle value/(values if its an even length array) in an array
  • tail: Returns the last values (i.e everything but the first) in an array
  • countLetters: Counts the number of letters in a string ignoring whitespace
  • countOnly: Returns the number of times an item appears in an array if the item is marked true
  • eqArrays: Checks if two arrays are equal
  • eqObjects: Checks if two objects are equal
  • findByKeyValue: Returns the key when passed the keys value
  • findKey: Returns a key when passed a callback to search for keys
  • flatten: Returns a flattened array when passed an array in an array
  • letterPositions: Returns the position of a letter in a string in relation to the string
  • map: Copy's one array to another given a parameter
  • takeUntil: Map's an array until it reaches a given parameter
  • without: Returns an array without the values of the other array
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago