Skip to content

Instantly share code, notes, and snippets.

@subtleGradient
Forked from subtleGradient/file.js
Created January 5, 2010 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save subtleGradient/269820 to your computer and use it in GitHub Desktop.
Save subtleGradient/269820 to your computer and use it in GitHub Desktop.
<script src="mootools.js"></script>
<script>
Moo.apply(this); // For non-strict browsers
Moo.apply(window); // For strict browsers
</script>
// CommonJS
var Moo = require('mootools');
Moo.apply(this); // For most CommonJS implementations
// For strict CommonJS implementations
Moo.apply({
String:String
});
var Class = Moo.Class;
var Moo = function(){
var context = this;
var Class = this.Class = function(){};
this.String.prototype.foo = function(){ return "foo'd"; };
context.String.prototype.bar = function(){ return "bar'd"; };
};
exports.Array = Array;
exports.String = String;
// etc…
exports.apply = function(context, args){
MooTools.apply(context);
return context
};
exports.apply(MooTools);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment