mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Rename Lo-Dash references to lodash. [ci skip]
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
;(function(window) {
|
||||
'use strict';
|
||||
|
||||
/** The base path of the Lo-Dash builds. */
|
||||
/** The base path of the lodash builds. */
|
||||
var basePath = '../';
|
||||
|
||||
/** The Lo-Dash build to load. */
|
||||
/** The lodash build to load. */
|
||||
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
|
||||
|
||||
/** The module loader to use. */
|
||||
@@ -95,12 +95,12 @@
|
||||
span1.innerHTML =
|
||||
'<label for="qunit-build">Build: </label>' +
|
||||
'<select id="qunit-build">' +
|
||||
'<option value="lodash-compat-dev">Lo-Dash (compat development)</option>' +
|
||||
'<option value="lodash-compat">Lo-Dash (compat production)</option>' +
|
||||
'<option value="lodash-modern-dev">Lo-Dash (modern development)</option>' +
|
||||
'<option value="lodash-modern">Lo-Dash (modern production)</option>' +
|
||||
'<option value="lodash-custom-dev">Lo-Dash (custom development)</option>' +
|
||||
'<option value="lodash-custom">Lo-Dash (custom production)</option>' +
|
||||
'<option value="lodash-compat-dev">lodash (compat development)</option>' +
|
||||
'<option value="lodash-compat">lodash (compat production)</option>' +
|
||||
'<option value="lodash-modern-dev">lodash (modern development)</option>' +
|
||||
'<option value="lodash-modern">lodash (modern production)</option>' +
|
||||
'<option value="lodash-custom-dev">lodash (custom development)</option>' +
|
||||
'<option value="lodash-custom">lodash (custom production)</option>' +
|
||||
'</select>';
|
||||
|
||||
var span2 = document.createElement('span');
|
||||
@@ -133,10 +133,10 @@
|
||||
// Used to indicate testing in Sauce Labs' automated test cloud.
|
||||
ui.isSauceLabs = location.port == '9001';
|
||||
|
||||
// Used to indicate that Lo-Dash is in strict mode.
|
||||
// Used to indicate that lodash is in strict mode.
|
||||
ui.isStrict = /\bes6?\b/.test([location.pathname, location.search]);
|
||||
|
||||
// The Lo-Dash build file path.
|
||||
// The lodash build file path.
|
||||
ui.buildPath = (function() {
|
||||
var result;
|
||||
switch (build) {
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
document.getElementById('qunit-urlconfig-hidepassed').checked = true;
|
||||
});
|
||||
|
||||
// load Lo-Dash
|
||||
// load lodash
|
||||
if (!ui.isModularize) {
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Lo-Dash Test Suite</title>
|
||||
<title>lodash Test Suite</title>
|
||||
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
|
||||
<style>
|
||||
#exports {
|
||||
@@ -247,14 +247,14 @@
|
||||
delete objectProto._propertyIsEnumerable;
|
||||
}
|
||||
|
||||
// load Lo-Dash and expose it to the bad extensions/shims
|
||||
// load lodash and expose it to the bad extensions/shims
|
||||
if (!ui.isModularize) {
|
||||
addBizarroMethods();
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
// store Lo-Dash to test for bad extensions/shims
|
||||
// store lodash to test for bad extensions/shims
|
||||
if (!ui.isModularize) {
|
||||
var lodashBizarro = window._;
|
||||
window._ = undefined;
|
||||
|
||||
12
test/test.js
12
test/test.js
@@ -24,7 +24,7 @@
|
||||
/** Used as a reference to the global object. */
|
||||
var root = (typeof global == 'object' && global) || this;
|
||||
|
||||
/** Used to store Lo-Dash to test for bad extensions/shims. */
|
||||
/** Used to store lodash to test for bad extensions/shims. */
|
||||
var lodashBizarro = root.lodashBizarro;
|
||||
|
||||
/** Used for native method references. */
|
||||
@@ -64,7 +64,7 @@
|
||||
return result;
|
||||
}());
|
||||
|
||||
/** The file path of the Lo-Dash file to test. */
|
||||
/** The file path of the lodash file to test. */
|
||||
var filePath = (function() {
|
||||
var min = 0,
|
||||
result = [];
|
||||
@@ -104,7 +104,7 @@
|
||||
'urlParams': {}
|
||||
});
|
||||
|
||||
/** The basename of the Lo-Dash file to test. */
|
||||
/** The basename of the lodash file to test. */
|
||||
var basename = /[\w.-]+$/.exec(filePath)[0];
|
||||
|
||||
/** Detect if in a Java environment. */
|
||||
@@ -122,7 +122,7 @@
|
||||
/** Detect if running in Rhino. */
|
||||
var isRhino = isJava && typeof global == 'function' && global().Array === root.Array;
|
||||
|
||||
/** Detect if Lo-Dash is in strict mode. */
|
||||
/** Detect if lodash is in strict mode. */
|
||||
var isStrict = ui.isStrict;
|
||||
|
||||
/** Used to test Web Workers. */
|
||||
@@ -517,10 +517,10 @@
|
||||
// Fake `WinRTError`.
|
||||
setProperty(root, 'WinRTError', Error);
|
||||
|
||||
// Clear cache so Lo-Dash can be reloaded.
|
||||
// Clear cache so lodash can be reloaded.
|
||||
emptyObject(require.cache);
|
||||
|
||||
// Load Lo-Dash and expose it to the bad extensions/shims.
|
||||
// Load lodash and expose it to the bad extensions/shims.
|
||||
lodashBizarro = (lodashBizarro = require(filePath))._ || lodashBizarro['default'] || lodashBizarro;
|
||||
|
||||
// Restore native methods.
|
||||
|
||||
Reference in New Issue
Block a user