1.0.4 • Published 2 years ago

@jackiestchen/lotide v1.0.4

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • assertArraysEqual: assert 2 arrays
  • assertEqual: assert 2 values
  • assertObjectsEqual: assert 2 objects (incomplete)
  • countLetters: count letters in a string
  • countOnly: count key/value pair in object
  • eqArrays: test if two arrays are the same type and value
  • eqObjects: test if two objects are the same key/value pair (incomplete)
  • findKey: find Key in object
  • findKeyByValue: find Key by value in object
  • flatten: flatten a nested array
  • head: return element of index 0 of an array
  • letterPositions: return first index position of a string
  • map: map with call back function
  • tail: return a new array without the first element
  • takeUntil: return a new array until first occurence of callback function
  • without: return a new array without elements from 2nd array
1.0.2

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago