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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@carmichaeldb/lotide

v1.0.1

Published

a collection of functions as a clone of Lodash, created and published for education purposes

Downloads

2

Readme

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

Require it:

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

Call it:

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

Documentation

The following functions are currently implemented:

  • assertArraysEqual(...): Takes two arrays and runs eqArrays to verify if they match. Returns a console.log message.
  • assertEqual(...): Takes two variables and verifies if they match. Returns a console.log message.
  • assertObjectsEqual(...): Takes two objects and runs eqObjects to verify if they match. Returns a console.log message.
  • countLetters(...): Counts the number of each letters in a string. Returns an object of letters with their number of occurances.
  • countOnly(...): Takes array of strings and object of search items. Returns object of search items and their number of occurances.
  • eqArrays(...): Takes two arrays and compares them for a perfect match with a true or false return.
  • eqObjects(...): Takes two objects and compares them as matching with a true or false return.
  • findKey(...): Takes object and callback to determine key in object. Returns the string of the key.
  • findKeyByValue(...): Takes object and value and searches object for key with matching value. Returns string of the key.
  • flatten(...): Takes array and flattens any nested arrays. Returns array.
  • head(...): Takes array and returns first index.
  • letterPositions(...): Takes string and returns object of each string letter as key and string index as value.
  • map(...): Takes array and callback function. Returns array from callback results.
  • middle(...): Takes array and returns array of items in the middle of index.
  • tail(...): Takes array and returns array minus first index of input array.
  • takeUntil(...): Takes array and callback. Returns array of values until callback returns true.
  • without(...): Takes array and values to remove from array. Returns new modified array.