npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@devhmac/lotide

v1.0.1

Published

Lotide library project for LHL

Downloads

5

Readme

LOTIDE Javascript Library

  • A mini recreation of the Lodash library. Published to NPM.

    • Built and published as project One of the Lighthouse Labs Bootcamp.

Purpose

BEWARE: This library was published for learning purposes. It is not intended for use in production-grade software.

Usage

Install it:

npm install @devhmac/lotide

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented,

Tools:

assertEqual()

  • Reconstructing a version of console.assert to verify if two items are equal to one another.
    • If passed, will output `✅✅✅✅ Assertion Passed: ${actual} === ${expected}`
    • if Failed, will ouput `🛑🛑🛑🛑 Assertion Failed: ${actual} !== ${expected}`

eqArrays()

  • compare arrays for equality, returning true/false if equal/not.

assertArraysEqual()

  • Utilizing eqArrays,outputting a console.log stating pass or fail based on whether or not arrays are equal.

eqObjects

  • compare objects for equality, returning true/false if equal/not.

assertObjectsEqual()

  • Utilizing eqObjects,outputting a console.log stating pass or fail based on whether or not arrays are equal.

head()

  • Function returning the first item of an array, or head
    • Then utilized assertEqual to perform checks

middle()

  • accepts array as argument, will return the middle element of array. If array is an even # of values, will return the middle two values.
    • return empty array if input only has one or two elements, as there is then no middle.

tail()

  • Function takes array as argument, returns new array with all values but the head.

without()

  • input two arrays, source and itemsToRemove. Return an array containing source, without any matching items from the itemsToRemove array.
    • Does not modify the original source array, returns a new once with the requested array elements removed.

flatten()

  • accepts an array input, which can include nested arrays and flattens them all into a single array, removing nesting.
    • Supports any amount of nesting due to utilizing recursion.

countLetters()

  • accepts string as argument, outputs an object recording the # of times each character in said string occurs.

letterPositions()

-accepts a string as argument. Will return an object with all characters in string, and that characters corresponding index in said string.

countOnly()

  • accepts an array and object as arguments. It will return an object containg counts of all array elements the input object listed as keys.
    • *NOTE it will only count property keys with a truthy value, if you wish to omit an element from the count, set that property key value to false.

findKeyByValue()

  • accepts two arguments, object and value. It scans the object and return the first key which contains the given value. If no key with that given value is found, returns undefined.

findKey()

  • higher order function accepts object and callback function. It will scan the object and return the first key for which the callback returns a truthy value. If no key is found, then it returns undefined.

map()

  • higher order function Accepts array, and callback function as arguments. Map will return a new array based on results of callback.
    • EG. map([1, 2, 3, 4], num => num + 10) will return [11, 12, 13, 14].

takeUntil()

  • higher order function accepts array and callback as arguments. Will return a "slice" of the array starting from the beginning, until the callback provided returns a truthy value.
    • EG. takeUntil([2, 4, 6, 8, 9, 10, 11], num => num % 2 !== 0) will return [2, 4, 6, 8]