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

importme

v0.0.2

Published

Tool for exporting and importing node local modules

Readme

The problem

When you require a local module from some directory whereas the required module is in another directory, then you have problem like this:

../../../../../ ... /foo.js

A lot of dots and once you change the directory of this foo.js then you have to change the all modules which requires this module

Solution

Reinventing the ES6 import keyword

(We have to do this because node doesn't support import [yet])

Installation

npm install importme

How to use?

First require _import and _export functions

let _import = require('importme').import
let _export = require('importme').export

Then add in the your route module (or the module which runs first when you start your app) your desired modules:

_export({
    foo: require('./foo.js'),
    bar: require('./bar.js'),
    baa: require('./haa/baa.js')
})

then import your modules from anywhere:

let foo = _import('foo')
let baa = _import('baa')

You can use with ES6 destructuring assignment syntax:

let {foo, bar} = _import('foo', 'bar')

Or even you can use from like syntax, i.e. import functions from the module

//./foo.js module
module.exports = {
    print: ()=>{
        console.log("I'm imported function from foo module")
    }
}
//your app initiator module
let _export = require('importme').export;

_export({
    foo: require('./foo.js')
})
//a module in some directory
let _import = require('importme').import

let print = _import('print').from('foo')
print() //I'm imported function from foo module

This is very small module yet, but there could be added a lot off nice features. If you would like to contribute, then you can open issue or make a pull request in github, they would be appreciated!