New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

lotide-library

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lotide-library

A Javascript library of functions that I've made at LHL Intro to Web Development bootcamp.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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

Require it:

const _ = require('@emikeke/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 everything except first element in an array
  • middle: returns middle-most element(s) in an array
  • assertArraysEqual: returns T/F after comparing actual with expected value (supports non primitive types)
  • assertEqual: compares actual with expected value (doesn't support objects & array)
  • assertObjectsEqual: returns T/F after comparing actual with expected value (supports objects)
  • countLetters: returns a count of each of the letters in a string
  • countOnly: returns counts for a specific subset of items
  • eqArrays: compares actual with expected value (supports arrays)
  • eqObjects: takes 2 objects, returns T/F based on a perfect match
  • findKey: returns the first key for which the callback returns a truthy value if no key i
  • findKeyByValue: returns the first key with contains the given value
  • letterPositions: return all the indicies in the string where each character is found
  • map: returns a new array based on the results of the callback function
  • takeUntil: returns a slice of the array with elements taken from the beginning and keeps going until the callback/predicate returns a truthy value
  • without: returns a subset of a given array, removing unwanted elements

FAQs

Package last updated on 20 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts