Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A li'l provide/require shim
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
dist
lib
test
.gitignore
Gruntfile.js
LICENSE
README.md
package.json

README.md

lilprovider

A li'l provide/require shim to share modules in the browser.

Description

lilprovider adds provide and require methods to the current context.

Basic usage

create and provide your module:

(function () {

  var blender = {
    blend: function () {}
  }

  provide('blender', blender);

}());

or wrap your node module

define('blender', function (require, module, exports) {

  module.exports = {
    blend: function () {}
  };

});

then somewhere else require and use your module:

(function () {

  var blender = require('blender');
  blender.blend();

}());

License

Copyright (c) 2013 August Hovland Licensed under the MIT license.

Something went wrong with that request. Please try again.