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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • head: returns first element in an array
  • tail: returns all but first element in an array
  • middle: returns middle section of array
  • assertArraysEqual: shows if arrays equal
  • assertEqual: shows if primitive values are equal
  • assertObjectsEqual: shows if contents of objects are equal
  • countLetters: counts letters
  • countOnly: counts specified elements
  • eqArray: determines if arrays are equal
  • eqObjects: determines if objects are equal
  • findKey: returns value by key
  • findKeyByValue: finds key by value
  • letterPositions: creates an array of positions by letter
  • map: does callback to array
  • takeUntil: takes items from array until condition met
  • without: removes items from array

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i @brandonbeam/lotide

    Weekly Downloads

    0

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    20.9 kB

    Total Files

    27

    Last publish

    Collaborators

    • brandonbeam