1.0.0 • Published 3 years ago

@yukifujiwara/mylotide v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 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 @yukifujiwara/lotide

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • assertArraysEquals: returns assertion for Array Equality
  • assertEqual: returns assertion for equality of primitive data types
  • assertObjectsEqual: returns assertion for Object equality
  • countLetters: counts number of letters
  • countOnly: counts the true values in passed object
  • eqArrays: checks Array equality
  • eqObjects: checks object equality
  • findKey: finds key of callback function statement
  • findKeyByValue: find key by passed value
  • head: find first element in array
  • letterPositions: returns an array of letter positions of letters in a word
  • map: performs callback on items in an array
  • middle: finds item(s) in middle of array