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

rekuire

v0.1.9

Published

'rekuire' is basically node's 'require' without the relative paths

Downloads

601

Readme

Rekuire NPM version

'rekuire' is basically node's 'require' without the relative paths!

It saves you TONS of time refactoring your code, and making it easily reusable. plus, it makes you code more readable = better!

Installation

to install, type

npm install rekuire


How to use it?

instead of doing this:

var MyModule = require('../../../MyModule.js'); <-- yuck!

you can now do this:

var rek = require('rekuire');
var myModule = rek('MyModule');

or that:

var myCoffee = rek('MyCoffee.coffee');
var myJson = rek('myJson.json');
var myModule = rek('src/api/MyModule');

Whats new?

####0.1.9

  • Fixed a bug causing the scanner to fail, if the fetched file was named like a default method like 'toString'

####0.1.8

  • Removed deprecated code - rek().path(...) will not work anymore, instead use rek.path(...).
  • Fixed an issue of causing rekuire not to scan the folders correctly when node_modules was a symlink.
  • Added .npmignore to the package - so you won't get the test files when adding dependencies

####0.1.7

  • Now you are able to describe ignored folders in your project inside the package.json file!

How does it work?

when 'rekuire' is first loaded into the project, it scans the source files locations, and stores them. so when you need them they are right there ready to use! no relative paths are needed! yeahy!

in order to tell the scanner, not to scan specific folders you can configure rekuire not to scan folders right from the package.json file:

...
"rekuire": {
	"ignore": ["out", "dist/target", "client/app"]
}
...

or you can set it up by code:

var mypath = rek.ignore('out', 'target', 'static/js');
// you should only do it once in your code

if you want to resolve only the file location, for example, when you want to use proxyquire. use:

var mypath = rek.path('MyModule');
// mypath = 'lib/classes/MyModule.js' 

for more examples, I recommend you to checkout the spec file :)

change log

####0.1.6

  • Added colliding files paths to Ambiguity Error

####0.1.5

  • Fixed a bug that causes failures when scanning a package with higher os privileges (thanks Dany!)

####0.1.4

  • Added a method to ignore folders while searching the right files (for example, the js files in the server's static folder)

####0.1.3

  • you can now rekuire file according to the relative path of the file
  • Added support for index.js files inside a folder - can be retrieved by the folder path

####0.1.2

  • Added support for .coffee files and .json

issues

if you are having any problems, requests or criticism, don't hesitate to open an issue, here

Development

To test, run: npm test