Bump to v3.3.0.

This commit is contained in:
John-David Dalton
2015-12-16 17:46:57 -08:00
parent 3ccb5e7da3
commit f8e4370129
91 changed files with 826 additions and 401 deletions

View File

@@ -1,4 +1,4 @@
define(['../internal/baseSlice', '../lang/isError'], function(baseSlice, isError) {
define(['../lang/isError'], function(isError) {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;
@@ -23,9 +23,16 @@ define(['../internal/baseSlice', '../lang/isError'], function(baseSlice, isError
* elements = [];
* }
*/
function attempt(func) {
function attempt() {
var length = arguments.length,
func = arguments[0];
try {
return func.apply(undefined, baseSlice(arguments, 1));
var args = Array(length ? length - 1 : 0);
while (--length > 0) {
args[length - 1] = arguments[length];
}
return func.apply(undefined, args);
} catch(e) {
return isError(e) ? e : new Error(e);
}