lotide_odeliafinkel

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • head: function that gets the first element in an array
  • tail: function that retrieves every element except the head (first element) of the array
  • middle: function that returns the middle element of an array
  • eqArrays: function that compares two arrays
  • eqObjects: function that compares two objects
  • findKey: function that looks through an object for the first key that the callback returns true
  • assertArraysEqual: function look for equality in arrays
  • assertEqual: function that looks for value equality
  • assertObjectsEqual: function that looks for object equality
  • countLetters: function that return the count for letters of a given string
  • without: function that removes elements from the given array
  • countOnly: function that returns the count for specific part of string
  • findKeyByValue: function that searches for an object key where value matches the input value
  • index: list of all the functions in an object
  • letterPositions: function that returns all the indices in the string corresponding to the given location
  • map: function that creates a new array with the results of calling
  • takeUntil: function that returns a subset of the array

Readme

Keywords

none

Package Sidebar

Install

npm i lotide_odeliafinkel

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

18.8 kB

Total Files

25

Last publish

Collaborators

  • odeliafinkel