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

mmmify

v0.0.2

Published

maximally minimal modules for a hypothetical es6

Downloads

8

Readme

mmmify

maximally minimal modules that are ACTUALLY minimal

This is a proof of concept for what ES6 should be doing for modules, instead of what they are actually doing which is so terrible you have no idea.

ES6 modules are some namespacey thing that doesn't care about the right things to make modularity really work. This proposal is by no means perfect but it would be so much better.

build status

syntax

Use import PATH to load a module from the string PATH. import is a keyword like typeof that just returns an ordinary value.

Use export VALUE to export functionality. Think of it like return that doesn't immediately jump out of the current context.

example

// main.js

var foo = import './foo.js'
console.log(foo(5));
// foo.js

var bar = import './bar.js'
export function (n) { return bar(n) * 10 };
// bar.js

export function (n) { return n + 3 };

build it with browserify:

$ browserify -t mmmify main.js > bundle.js

then run it with node (or a browser):

$ node bundle.js
80

POW.

methods

var mmmify = require('mmmify')

This module is a browserify transform but you don't need to use browserify necessarily to use it.

mmmify()

Return a through-stream desugaring import and export keywords into require() and module.exports=... that can be parsed by node and browserify.

see also

This module syntax proposal is really similar to isaac's great es6 modules proposal.

Check out domenic's gist on node<->es6 interop while you're at it.

todo

Right now import and export just desugar to require() and module.exports but in the future they could be made to do something slightly more robust and static analysis-y. The point of this proof of concept module is to demonstrate how excellent and simple ES6 modules could possibly be.

install

With npm do:

npm install mmmify

license

MIT