mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Rebuild docs, files, and update minifiers.
Former-commit-id: 65b04c3efc7677c8ec5cc7ce6e5840fed23b3716
This commit is contained in:
2
vendor/benchmark.js/README.md
vendored
2
vendor/benchmark.js/README.md
vendored
@@ -15,7 +15,7 @@ For a list of upcoming features, check out our [roadmap](https://github.com/best
|
||||
|
||||
## Support
|
||||
|
||||
Benchmark.js has been tested in at least Chrome 5~26, Firefox 2~20, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.10.5, Narwhal 0.3.2, PhantomJS 1.9.0, RingoJS 0.9, and Rhino 1.7RC5.
|
||||
Benchmark.js has been tested in at least Chrome 5~26, Firefox 2~21, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.10.5, Narwhal 0.3.2, PhantomJS 1.9.0, RingoJS 0.9, and Rhino 1.7RC5.
|
||||
|
||||
## Installation and usage
|
||||
|
||||
|
||||
2
vendor/benchmark.js/benchmark.js
vendored
2
vendor/benchmark.js/benchmark.js
vendored
@@ -1675,7 +1675,7 @@
|
||||
// start timer
|
||||
't#.start(d#);' +
|
||||
// execute `deferred.fn` and return a dummy object
|
||||
'}d#.fn();return{}'
|
||||
'}d#.fn();return{uid:"${uid}"}'
|
||||
|
||||
: 'var r#,s#,m#=this,f#=m#.fn,i#=m#.count,n#=t#.ns;${setup}\n${begin};' +
|
||||
'while(i#--){${fn}\n}${end};${teardown}\nreturn{elapsed:r#,uid:"${uid}"}'
|
||||
|
||||
4
vendor/docdown/src/DocDown/Generator.php
vendored
4
vendor/docdown/src/DocDown/Generator.php
vendored
@@ -321,9 +321,7 @@ class Generator {
|
||||
|
||||
$api[$member] = $entry;
|
||||
foreach ($entry->getAliases() as $alias) {
|
||||
$api[$member] = $alias;
|
||||
$alias->static = array();
|
||||
$alias->plugin = array();
|
||||
$api[$member]->static[] = $alias;
|
||||
}
|
||||
}
|
||||
else if ($entry->isStatic()) {
|
||||
|
||||
2
vendor/platform.js/README.md
vendored
2
vendor/platform.js/README.md
vendored
@@ -18,7 +18,7 @@ For a list of upcoming features, check out our [roadmap](https://github.com/best
|
||||
|
||||
## Support
|
||||
|
||||
Platform.js has been tested in at least Chrome 5~26, Firefox 2~20, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.10.5, Narwhal 0.3.2, PhantomJS 1.9.0, RingoJS 0.9, and Rhino 1.7RC5.
|
||||
Platform.js has been tested in at least Chrome 5~26, Firefox 2~21, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.10.5, Narwhal 0.3.2, PhantomJS 1.9.0, RingoJS 0.9, and Rhino 1.7RC5.
|
||||
|
||||
## Installation and usage
|
||||
|
||||
|
||||
70
vendor/requirejs/require.js
vendored
70
vendor/requirejs/require.js
vendored
@@ -1,5 +1,5 @@
|
||||
/** vim: et:ts=4:sw=4:sts=4
|
||||
* @license RequireJS 2.1.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
|
||||
* @license RequireJS 2.1.6 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
|
||||
* Available via the MIT or new BSD license.
|
||||
* see: http://github.com/jrburke/requirejs for details
|
||||
*/
|
||||
@@ -12,7 +12,7 @@ var requirejs, require, define;
|
||||
(function (global) {
|
||||
var req, s, head, baseElement, dataMain, src,
|
||||
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
||||
version = '2.1.5',
|
||||
version = '2.1.6',
|
||||
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
|
||||
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
||||
jsSuffixRegExp = /\.js$/,
|
||||
@@ -22,7 +22,7 @@ var requirejs, require, define;
|
||||
hasOwn = op.hasOwnProperty,
|
||||
ap = Array.prototype,
|
||||
apsp = ap.splice,
|
||||
isBrowser = !!(typeof window !== 'undefined' && navigator && document),
|
||||
isBrowser = !!(typeof window !== 'undefined' && navigator && window.document),
|
||||
isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
|
||||
//PS3 indicates loaded and complete, but need to wait for complete
|
||||
//specifically. Sequence is 'loading', 'loaded', execution,
|
||||
@@ -134,6 +134,10 @@ var requirejs, require, define;
|
||||
return document.getElementsByTagName('script');
|
||||
}
|
||||
|
||||
function defaultOnError(err) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
//Allow getting a global that expressed in
|
||||
//dot notation, like 'a.b.c'.
|
||||
function getGlobal(value) {
|
||||
@@ -500,7 +504,12 @@ var requirejs, require, define;
|
||||
fn(defined[id]);
|
||||
}
|
||||
} else {
|
||||
getModule(depMap).on(name, fn);
|
||||
mod = getModule(depMap);
|
||||
if (mod.error && name === 'error') {
|
||||
fn(mod.error);
|
||||
} else {
|
||||
mod.on(name, fn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -571,7 +580,13 @@ var requirejs, require, define;
|
||||
id: mod.map.id,
|
||||
uri: mod.map.url,
|
||||
config: function () {
|
||||
return (config.config && getOwn(config.config, mod.map.id)) || {};
|
||||
var c,
|
||||
pkg = getOwn(config.pkgs, mod.map.id);
|
||||
// For packages, only support config targeted
|
||||
// at the main module.
|
||||
c = pkg ? getOwn(config.config, mod.map.id + '/' + pkg.main) :
|
||||
getOwn(config.config, mod.map.id);
|
||||
return c || {};
|
||||
},
|
||||
exports: defined[mod.map.id]
|
||||
});
|
||||
@@ -840,8 +855,13 @@ var requirejs, require, define;
|
||||
if (this.depCount < 1 && !this.defined) {
|
||||
if (isFunction(factory)) {
|
||||
//If there is an error listener, favor passing
|
||||
//to that instead of throwing an error.
|
||||
if (this.events.error) {
|
||||
//to that instead of throwing an error. However,
|
||||
//only do it for define()'d modules. require
|
||||
//errbacks should not be called for failures in
|
||||
//their callbacks (#699). However if a global
|
||||
//onError is set, use that.
|
||||
if ((this.events.error && this.map.isDefine) ||
|
||||
req.onError !== defaultOnError) {
|
||||
try {
|
||||
exports = context.execCb(id, factory, depExports, exports);
|
||||
} catch (e) {
|
||||
@@ -869,8 +889,8 @@ var requirejs, require, define;
|
||||
|
||||
if (err) {
|
||||
err.requireMap = this.map;
|
||||
err.requireModules = [this.map.id];
|
||||
err.requireType = 'define';
|
||||
err.requireModules = this.map.isDefine ? [this.map.id] : null;
|
||||
err.requireType = this.map.isDefine ? 'define' : 'require';
|
||||
return onError((this.error = err));
|
||||
}
|
||||
|
||||
@@ -1093,7 +1113,7 @@ var requirejs, require, define;
|
||||
}));
|
||||
|
||||
if (this.errback) {
|
||||
on(depMap, 'error', this.errback);
|
||||
on(depMap, 'error', bind(this, this.errback));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1605,7 +1625,7 @@ var requirejs, require, define;
|
||||
},
|
||||
|
||||
/**
|
||||
* Executes a module callack function. Broken out as a separate function
|
||||
* Executes a module callback function. Broken out as a separate function
|
||||
* solely to allow the build system to sequence the files in the built
|
||||
* layer in the right sequence.
|
||||
*
|
||||
@@ -1643,7 +1663,7 @@ var requirejs, require, define;
|
||||
onScriptError: function (evt) {
|
||||
var data = getScriptData(evt);
|
||||
if (!hasPathFallback(data.id)) {
|
||||
return onError(makeError('scripterror', 'Script error', evt, [data.id]));
|
||||
return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1772,9 +1792,7 @@ var requirejs, require, define;
|
||||
* function. Intercept/override it if you want custom error handling.
|
||||
* @param {Error} err the error object.
|
||||
*/
|
||||
req.onError = function (err) {
|
||||
throw err;
|
||||
};
|
||||
req.onError = defaultOnError;
|
||||
|
||||
/**
|
||||
* Does the request to load a module for the browser case.
|
||||
@@ -1906,24 +1924,31 @@ var requirejs, require, define;
|
||||
//baseUrl, if it is not already set.
|
||||
dataMain = script.getAttribute('data-main');
|
||||
if (dataMain) {
|
||||
//Preserve dataMain in case it is a path (i.e. contains '?')
|
||||
mainScript = dataMain;
|
||||
|
||||
//Set final baseUrl if there is not already an explicit one.
|
||||
if (!cfg.baseUrl) {
|
||||
//Pull off the directory of data-main for use as the
|
||||
//baseUrl.
|
||||
src = dataMain.split('/');
|
||||
src = mainScript.split('/');
|
||||
mainScript = src.pop();
|
||||
subPath = src.length ? src.join('/') + '/' : './';
|
||||
|
||||
cfg.baseUrl = subPath;
|
||||
dataMain = mainScript;
|
||||
}
|
||||
|
||||
//Strip off any trailing .js since dataMain is now
|
||||
//Strip off any trailing .js since mainScript is now
|
||||
//like a module name.
|
||||
dataMain = dataMain.replace(jsSuffixRegExp, '');
|
||||
mainScript = mainScript.replace(jsSuffixRegExp, '');
|
||||
|
||||
//If mainScript is still a path, fall back to dataMain
|
||||
if (req.jsExtRegExp.test(mainScript)) {
|
||||
mainScript = dataMain;
|
||||
}
|
||||
|
||||
//Put the data-main script in the files to load.
|
||||
cfg.deps = cfg.deps ? cfg.deps.concat(dataMain) : [dataMain];
|
||||
cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1951,12 +1976,13 @@ var requirejs, require, define;
|
||||
//This module may not have dependencies
|
||||
if (!isArray(deps)) {
|
||||
callback = deps;
|
||||
deps = [];
|
||||
deps = null;
|
||||
}
|
||||
|
||||
//If no name, and callback is a function, then figure out if it a
|
||||
//CommonJS thing with dependencies.
|
||||
if (!deps.length && isFunction(callback)) {
|
||||
if (!deps && isFunction(callback)) {
|
||||
deps = [];
|
||||
//Remove comments from the callback string,
|
||||
//look for require calls, and pull them into the dependencies,
|
||||
//but only if there are function args.
|
||||
|
||||
2
vendor/underscore/underscore-min.js
vendored
2
vendor/underscore/underscore-min.js
vendored
File diff suppressed because one or more lines are too long
24
vendor/underscore/underscore.js
vendored
24
vendor/underscore/underscore.js
vendored
@@ -365,7 +365,7 @@
|
||||
return low;
|
||||
};
|
||||
|
||||
// Safely convert anything iterable into a real, live array.
|
||||
// Safely create a real, live array from anything iterable.
|
||||
_.toArray = function(obj) {
|
||||
if (!obj) return [];
|
||||
if (_.isArray(obj)) return slice.call(obj);
|
||||
@@ -425,7 +425,7 @@
|
||||
// Internal implementation of a recursive `flatten` function.
|
||||
var flatten = function(input, shallow, output) {
|
||||
each(input, function(value) {
|
||||
if (_.isArray(value)) {
|
||||
if (_.isArray(value) || _.isArguments(value)) {
|
||||
shallow ? push.apply(output, value) : flatten(value, shallow, output);
|
||||
} else {
|
||||
output.push(value);
|
||||
@@ -468,7 +468,7 @@
|
||||
// Produce an array that contains the union: each distinct element from all of
|
||||
// the passed-in arrays.
|
||||
_.union = function() {
|
||||
return _.uniq(concat.apply(ArrayProto, arguments));
|
||||
return _.uniq(_.flatten(arguments, true));
|
||||
};
|
||||
|
||||
// Produce an array that contains every item shared between all the
|
||||
@@ -492,13 +492,7 @@
|
||||
// Zip together multiple lists into a single array -- elements that share
|
||||
// an index go together.
|
||||
_.zip = function() {
|
||||
var args = slice.call(arguments);
|
||||
var length = _.max(_.pluck(args, 'length'));
|
||||
var results = new Array(length);
|
||||
for (var i = 0; i < length; i++) {
|
||||
results[i] = _.pluck(args, "" + i);
|
||||
}
|
||||
return results;
|
||||
return _.unzip(slice.call(arguments));
|
||||
};
|
||||
|
||||
// The inverse operation to `_.zip`. If given an array of pairs it
|
||||
@@ -507,9 +501,13 @@
|
||||
// three element array and so on. For example, `_.unzip` given
|
||||
// `[['a',1],['b',2],['c',3]]` returns the array
|
||||
// [['a','b','c'],[1,2,3]].
|
||||
_.unzip = function(tuples) {
|
||||
var maxLen = _.max(_.pluck(tuples, "length"))
|
||||
return _.times(maxLen, _.partial(_.pluck, tuples));
|
||||
_.unzip = function(list) {
|
||||
var length = _.max(_.pluck(list, "length").concat(0));
|
||||
var results = new Array(length);
|
||||
for (var i = 0; i < length; i++) {
|
||||
results[i] = _.pluck(list, '' + i);
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
// Converts lists into objects. Pass either a single array of `[key, value]`
|
||||
|
||||
Reference in New Issue
Block a user