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 🙏

© 2026 – Pkg Stats / Ryan Hefner

require-quick

v1.0.0

Published

A quick way to use local modules within a project.

Readme

require-quick

A quick way to use local modules within a project.

There are already many NPM packages which share the same essential purpose as require-quick. Yet, my ideas differ slightly, and because organization of code is important to the flavor of any project, I thought I'd "roll my own" once again.

The goals of require-quick are:

  1. To allow developers to quickly create modules with nothing but a single JS file.
  2. To allow developers to easily organize these modules in whatever directory structure is desired.
  3. It should only scan through the filesystem once. We don't want to perform another scan each time a module is imported.

Create Modules With Nothing But A Single JS File

Simply make a file with the same name as the module, and add .js at the end. For example, requireQuick('my-module') would live in single file called my-module.js.

Easily Organize Modules In Whatever Directory Structure

Those "single JS files" can be nested as deeply as you want in as many directories as you want. You just supply an environment variable beginning with rqroot, to use for the root path. (Also, more than one root path can be specified: just use more than one environment variable. Module location precedence is according to the "[].sort()" order of the env var names.)

For example,

const path          = require('path');
const requireQuick  = require('require-quick');

process.env.rqroot_one  = 'C:\\files\\quick modules';
process.env.rqroot_two  = path.join(__dirname, 'project modules');  // Since "t" > "o", this root gets subordinate precedence.

const myModule        = requireQuick('my-module');         // Located somewhere within "quick modules".
const aProjectModule  = requireQuick('a-project-module');  // Located somewhere within "project modules".

Of course, you can set environment variables any way you want:

  • Via a system-wide setting.
  • Before process launch, via the launch command.
  • After process launch, using process.env. (As in the example above.)

Only Scans The Filesystem Once

All root paths are scanned for JS files during the first invocation of requireQuick('some-module') — though each module itself still isn't loaded until require time (as typical). Thus, make sure that the env vars are set, and the JS files themselves are in place, prior to the first invocation.