Skip to content
This repository has been archived by the owner on Jul 13, 2020. It is now read-only.

Commit

Permalink
whitespace cleanup and removal of smart apostrophes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed May 23, 2012
1 parent 985525d commit 36c171f
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 69 deletions.
68 changes: 34 additions & 34 deletions dist/es6-module-loader.js
@@ -1,17 +1,17 @@
/*! es6-module-loader - v0.1.0 - 5/20/2012
/*! es6-module-loader - v0.1.0 - 5/22/2012
* https://github.com/addyosmani/es6-module-loader
* Copyright (c) 2012 Luke Hogan, Addy Osmani; Licensed MIT */

(function (global) {


// new Loader( parent [, options ] ) - Module loader constructor
// The Loader constructor creates a new loader. The first argument is the
// parent loader. The second is an options object
// The Loader constructor creates a new loader. The first argument is the
// parent loader. The second is an options object
//
// options.global - The loaders global object
// options.baseURL - The loaders base URL
// options.linkedTo - The source of the loaders intrinsics (not impl)
// options.global - The loader's global object
// options.baseURL - The loader's base URL
// options.linkedTo - The source of the loader's intrinsics (not impl)
// options.strict - should code evaluated in the loader be in strict mode?
// options.resolve( relURL, baseURL ) - The URL resolution hook
// options.fetch( relURL, baseURL, request, resolved ) - The module loading hook
Expand Down Expand Up @@ -52,11 +52,11 @@


// Loader.prototype.load( url, callback, errback )
//
// The load method takes a string representing a module URL and a
// callback that receives the result of loading, compiling, and
// executing the module at that URL. The compiled code is statically
// associated with this loader, and its URL is the given URL. The
//
// The load method takes a string representing a module URL and a
// callback that receives the result of loading, compiling, and
// executing the module at that URL. The compiled code is statically
// associated with this loader, and its URL is the given URL. The
// additional callback is used if an error occurs.
Loader.prototype.load = function (url, callback, errback) {
var key = this._resolve(url, this._baseURL);
Expand All @@ -73,7 +73,7 @@
if (self._strict) {
actualSrc = "'use strict';\n" + actualSrc;
}

evalSrc = eval(actualSrc);
self.set(url, evalSrc);
callback(self._mios[key]);
Expand All @@ -89,7 +89,7 @@
};

// Loader.prototype.eval( src )
// The eval method takes a string representing a Program and returns
// The eval method takes a string representing a Program and returns
// the result of compiling and executing the program.
Loader.prototype.eval = function (sourceText) {
with(this._global) {
Expand All @@ -100,10 +100,10 @@

// Loader.prototype.evalAsync( src, callback, errback )
//
// The evalAsync method takes a string representing a Program and a
// callback that receives the result of compiling and executing the
// program. The compiled code is statically associated with this loader,
// and its URL is the base URL of this loader. The additional callback
// The evalAsync method takes a string representing a Program and a
// callback that receives the result of compiling and executing the
// program. The compiled code is statically associated with this loader,
// and its URL is the base URL of this loader. The additional callback
// is used if an error occurs.

Loader.prototype.evalAsync = function () {
Expand All @@ -113,19 +113,19 @@

// Loader.prototype.get( url )
//
// The get method looks up a module in the loaders module instance table.
// The URL is resolved to a key by calling the loaders resolve operation.
// The get method looks up a module in the loader's module instance table.
// The URL is resolved to a key by calling the loader's resolve operation.
Loader.prototype.get = function (url) {
var key = this._resolve(url, this._baseURL);
return this._mios[key];
};


// Loader.prototype.set( urlOrMods[, mod ] )
//
// The set method stores a module or set of modules in the loader’s
// module instance table. Each URL is resolved to a key by calling
// the loaders resolve operation.
//
// The set method stores a module or set of modules in the loader's
// module instance table. Each URL is resolved to a key by calling
// the loader's resolve operation.
Loader.prototype.set = function (url, mio) {
var key = this._resolve(url, this._baseURL);
if (typeof url === "string") {
Expand All @@ -139,9 +139,9 @@

// Loader.prototype.defineBuiltins( [ obj ] )
//
// The defineBuiltins method takes an object and defines all the built-in
// objects and functions of the ES6 standard library associated with this
// loaders intrinsics as properties on the object.
// The defineBuiltins method takes an object and defines all the built-in
// objects and functions of the ES6 standard library associated with this
// loader's intrinsics as properties on the object.
Loader.prototype.defineBuiltins = function (o) {
if (typeof o != "object") throw new Error("Expected object");
for (var globalProp in global) {
Expand All @@ -152,15 +152,15 @@


function Module(o) {

if (o === null) throw new TypeError("Expected object");
var obj = Object(o);
var obj = Object(o);
if (obj instanceof Module) {
return obj;
return obj;
} else {

var mio = Object.create(null);
var mio = Object.create(null);

for (var key in obj) {
(function (key) {
Object.defineProperty(mio, key, {
Expand All @@ -172,7 +172,7 @@
});
})(key);
}

return mio;
}
};
Expand Down Expand Up @@ -215,5 +215,5 @@
// Export the System object
global.System = defaultSystemLoader;

})(window);

})(window);
4 changes: 2 additions & 2 deletions dist/es6-module-loader.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 33 additions & 33 deletions lib/es6-module-loader.js
Expand Up @@ -10,12 +10,12 @@


// new Loader( parent [, options ] ) - Module loader constructor
// The Loader constructor creates a new loader. The first argument is the
// parent loader. The second is an options object
// The Loader constructor creates a new loader. The first argument is the
// parent loader. The second is an options object
//
// options.global - The loaders global object
// options.baseURL - The loaders base URL
// options.linkedTo - The source of the loaders intrinsics (not impl)
// options.global - The loader's global object
// options.baseURL - The loader's base URL
// options.linkedTo - The source of the loader's intrinsics (not impl)
// options.strict - should code evaluated in the loader be in strict mode?
// options.resolve( relURL, baseURL ) - The URL resolution hook
// options.fetch( relURL, baseURL, request, resolved ) - The module loading hook
Expand Down Expand Up @@ -56,11 +56,11 @@


// Loader.prototype.load( url, callback, errback )
//
// The load method takes a string representing a module URL and a
// callback that receives the result of loading, compiling, and
// executing the module at that URL. The compiled code is statically
// associated with this loader, and its URL is the given URL. The
//
// The load method takes a string representing a module URL and a
// callback that receives the result of loading, compiling, and
// executing the module at that URL. The compiled code is statically
// associated with this loader, and its URL is the given URL. The
// additional callback is used if an error occurs.
Loader.prototype.load = function (url, callback, errback) {
var key = this._resolve(url, this._baseURL);
Expand All @@ -77,7 +77,7 @@
if (self._strict) {
actualSrc = "'use strict';\n" + actualSrc;
}

evalSrc = eval(actualSrc);
self.set(url, evalSrc);
callback(self._mios[key]);
Expand All @@ -93,7 +93,7 @@
};

// Loader.prototype.eval( src )
// The eval method takes a string representing a Program and returns
// The eval method takes a string representing a Program and returns
// the result of compiling and executing the program.
Loader.prototype.eval = function (sourceText) {
with(this._global) {
Expand All @@ -104,10 +104,10 @@

// Loader.prototype.evalAsync( src, callback, errback )
//
// The evalAsync method takes a string representing a Program and a
// callback that receives the result of compiling and executing the
// program. The compiled code is statically associated with this loader,
// and its URL is the base URL of this loader. The additional callback
// The evalAsync method takes a string representing a Program and a
// callback that receives the result of compiling and executing the
// program. The compiled code is statically associated with this loader,
// and its URL is the base URL of this loader. The additional callback
// is used if an error occurs.

Loader.prototype.evalAsync = function () {
Expand All @@ -117,19 +117,19 @@

// Loader.prototype.get( url )
//
// The get method looks up a module in the loaders module instance table.
// The URL is resolved to a key by calling the loaders resolve operation.
// The get method looks up a module in the loader's module instance table.
// The URL is resolved to a key by calling the loader's resolve operation.
Loader.prototype.get = function (url) {
var key = this._resolve(url, this._baseURL);
return this._mios[key];
};


// Loader.prototype.set( urlOrMods[, mod ] )
//
// The set method stores a module or set of modules in the loader’s
// module instance table. Each URL is resolved to a key by calling
// the loaders resolve operation.
//
// The set method stores a module or set of modules in the loader's
// module instance table. Each URL is resolved to a key by calling
// the loader's resolve operation.
Loader.prototype.set = function (url, mio) {
var key = this._resolve(url, this._baseURL);
if (typeof url === "string") {
Expand All @@ -143,9 +143,9 @@

// Loader.prototype.defineBuiltins( [ obj ] )
//
// The defineBuiltins method takes an object and defines all the built-in
// objects and functions of the ES6 standard library associated with this
// loaders intrinsics as properties on the object.
// The defineBuiltins method takes an object and defines all the built-in
// objects and functions of the ES6 standard library associated with this
// loader's intrinsics as properties on the object.
Loader.prototype.defineBuiltins = function (o) {
if (typeof o != "object") throw new Error("Expected object");
for (var globalProp in global) {
Expand All @@ -156,15 +156,15 @@


function Module(o) {

if (o === null) throw new TypeError("Expected object");
var obj = Object(o);
var obj = Object(o);
if (obj instanceof Module) {
return obj;
return obj;
} else {

var mio = Object.create(null);
var mio = Object.create(null);

for (var key in obj) {
(function (key) {
Object.defineProperty(mio, key, {
Expand All @@ -176,7 +176,7 @@
});
})(key);
}

return mio;
}
};
Expand Down Expand Up @@ -219,5 +219,5 @@
// Export the System object
global.System = defaultSystemLoader;

})(window);

})(window);

0 comments on commit 36c171f

Please sign in to comment.