More comment cleanup. [ci skip]

This commit is contained in:
John-David Dalton
2014-11-16 08:45:36 +01:00
parent 6b72adbeee
commit 0d87b7d720
8 changed files with 232 additions and 247 deletions

View File

@@ -1,21 +1,21 @@
;(function() {
/** Used to determine if values are of the language type Object */
/** Used to determine if values are of the language type Object. */
var objectTypes = {
'function': true,
'object': true
};
/** Used as the `Set#toString` return value */
/** Used as the `Set#toString` return value. */
var nativeString = String(Object.prototype.toString).replace(/toString/g, 'Set');
/** Used as a reference to the global object */
/** Used as a reference to the global object. */
var root = (objectTypes[typeof window] && window) || this;
/** Detect free variable `exports` */
/** Detect free variable `exports`. */
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
/** Detect free variable `global` from Node.js or Browserified code and use it as `root` */
/** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */
var freeGlobal = objectTypes[typeof global] && global;
if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
root = freeGlobal;

View File

@@ -1,16 +1,16 @@
;(function(window) {
'use strict';
/** The base path of the builds */
/** The base path of the Lo-Dash builds. */
var basePath = '../';
/** The Lo-Dash build to load */
/** The Lo-Dash build to load. */
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
/** The module loader to use */
/** The module loader to use. */
var loader = (loader = /loader=([^&]+)/.exec(location.search)) && decodeURIComponent(loader[1]);
/** The `ui` object */
/** The `ui` object. */
var ui = {};
/*--------------------------------------------------------------------------*/
@@ -34,7 +34,7 @@
/*--------------------------------------------------------------------------*/
// initialize controls
// Initialize controls.
addListener(window, 'load', function() {
function eventHandler(event) {
var buildIndex = buildList.selectedIndex,
@@ -124,19 +124,19 @@
init();
});
// used to indicate that Lo-Dash is in strict mode
// Used to indicate that Lo-Dash is in strict mode.
ui.isStrict = /\b(?:lodash-es6|transpiled)\b/.test([location.pathname, location.search]);
// used to indicate testing a foreign file
// Used to indicate testing a foreign file.
ui.isForeign = RegExp('^(\\w+:)?//').test(build);
// used to indicate testing a modularized build
// Used to indicate testing a modularized build.
ui.isModularize = /\b(?:commonjs|(index|main)\.js|lodash-(?:amd|es6|node)|modularize|npm|transpiled)\b/.test([location.pathname, location.search]);
// used to indicate testing in Sauce Labs' automated test cloud
// Used to indicate testing in Sauce Labs' automated test cloud.
ui.isSauceLabs = location.port == '9001';
// expose Lo-Dash build file path
// The Lo-Dash build file path.
ui.buildPath = (function() {
var result;
switch (build) {
@@ -152,7 +152,7 @@
return basePath + result;
}());
// expose module loader file path
// The module loader file path.
ui.loaderPath = (function() {
var result;
switch (loader) {
@@ -165,18 +165,9 @@
return basePath + result;
}());
// expose `ui.urlParams` properties
ui.urlParams = {
'build': build,
'loader': loader
};
ui.urlParams = { 'build': build, 'loader': loader };
ui.timing = { 'loadEventEnd': 0 };
// expose page load timestamps
ui.timing = {
'loadEventEnd': 0
};
// expose `ui`
window.ui = ui;
}(this));

View File

@@ -1,21 +1,21 @@
;(function() {
/** Used to determine if values are of the language type Object */
/** Used to determine if values are of the language type Object. */
var objectTypes = {
'function': true,
'object': true
};
/** Used as the `WeakMap#toString` return value */
/** Used as the `WeakMap#toString` return value. */
var nativeString = String(Object.prototype.toString).replace(/toString/g, 'WeakMap');
/** Used as a reference to the global object */
/** Used as a reference to the global object. */
var root = (objectTypes[typeof window] && window) || this;
/** Detect free variable `exports` */
/** Detect free variable `exports`. */
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
/** Detect free variable `global` from Node.js or Browserified code and use it as `root` */
/** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */
var freeGlobal = objectTypes[typeof global] && global;
if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
root = freeGlobal;
@@ -35,7 +35,7 @@
* Creates a `WeakMap` object.
*/
function WeakMap() {
// no-op
// No operation performed.
}
/**