From cf73ba2905c1967a44e586fd7afdfb75c5a1a0f4 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 15 Apr 2014 01:02:14 -0700 Subject: [PATCH] Update other vendors. --- vendor/benchmark.js/benchmark.js | 36 ++++---- vendor/curl/dist/curl-kitchen-sink/curl.js | 95 +++++++++++----------- 2 files changed, 67 insertions(+), 64 deletions(-) diff --git a/vendor/benchmark.js/benchmark.js b/vendor/benchmark.js/benchmark.js index 5a4ea37b2..0fb51ed63 100644 --- a/vendor/benchmark.js/benchmark.js +++ b/vendor/benchmark.js/benchmark.js @@ -123,7 +123,7 @@ * @returns {Function} Returns a new `Benchmark` function. */ function runInContext(context) { - // exit early if unable to acquire lodash + // exit early if unable to acquire Lo-Dash var _ = context && context._ || req('lodash') || root._; if (!_) { Benchmark.runInContext = runInContext; @@ -167,10 +167,10 @@ /** Detect DOM document object */ var doc = isHostType(context, 'document') && context.document; - /** Used to access Wade Simmons' Node microtime module */ + /** Used to access Wade Simmons' Node.js `microtime` module */ var microtimeObject = req('microtime'); - /** Used to access Node's high resolution timer */ + /** Used to access Node.js's high resolution timer */ var processObject = isHostType(context, 'process') && context.process; /** Used to prevent a `removeChild` memory leak in IE < 9 */ @@ -234,10 +234,10 @@ */ try { // Safari 2.x removes commas in object literals - // from Function#toString results + // from `Function#toString` results // http://webk.it/11609 // Firefox 3.6 and Opera 9.25 strip grouping - // parentheses from Function#toString results + // parentheses from `Function#toString` results // http://bugzil.la/559438 support.decompilation = Function( ('return (' + (function(x) { return { 'x': '' + (1 + x) + '', 'y': 0 }; }) + ')') @@ -313,7 +313,7 @@ * // or with options * var bench = new Benchmark('foo', fn, { * - * // displayed by Benchmark#toString if `name` is not available + * // displayed by `Benchmark#toString` if `name` is not available * 'id': 'xyz', * * // called when the benchmark starts running @@ -349,7 +349,7 @@ * * // benchmark test function * 'fn': function(deferred) { - * // call resolve() when the deferred test is finished + * // call `Deferred#resolve` when the deferred test is finished * deferred.resolve(); * } * }); @@ -366,7 +366,7 @@ * * // a test's `this` binding is set to the benchmark instance * var bench = new Benchmark('foo', function() { - * 'My name is '.concat(this.name); // My name is foo + * 'My name is '.concat(this.name); // "My name is foo" * }); */ function Benchmark(name, fn, options) { @@ -509,7 +509,7 @@ * @returns {*} The cloned value. */ var cloneDeep = _.partialRight(_.cloneDeep, function(value) { - // do not clone non-Object objects + // only clone primitives, arrays, and plain objects return (typeof value == 'object' && !_.isArray(value) && !_.isPlainObject(value)) ? value : undefined; @@ -654,7 +654,7 @@ } /** - * A wrapper around require() to suppress `module missing` errors. + * A wrapper around `require()` to suppress `module missing` errors. * * @private * @param {string} id The module id. @@ -875,7 +875,7 @@ } // execute method result[index] = _.isFunction(bench && bench[name]) ? bench[name].apply(bench, args) : undefined; - // if synchronous return true until finished + // if synchronous return `true` until finished return !async && getNext(); } @@ -1627,7 +1627,7 @@ try { if (isEmpty) { - // Firefox may remove dead code from Function#toString results + // Firefox may remove dead code from `Function#toString` results // http://bugzil.la/536085 throw new Error('The test "' + name + '" is empty. This may be the result of dead code removal.'); } @@ -1795,7 +1795,7 @@ begin = new ns().getTime(); while (!(measured = new ns().getTime() - begin)) { } } - // check for broken timers (nanoTime may have issues) + // check for broken timers (`nanoTime` may have issues) // http://alivebutsleepy.srnet.cz/unreliable-system-nanotime/ if (measured > 0) { sample.push(measured); @@ -1839,11 +1839,11 @@ } } catch(e) { } - // detect Node's nanosecond resolution timer available in Node >= 0.8 + // detect Node.js's nanosecond resolution timer available in Node.js >= 0.8 if (processObject && typeof (timer.ns = processObject.hrtime) == 'function') { timers.push({ 'ns': timer.ns, 'res': getRes('ns'), 'unit': 'ns' }); } - // detect Wade Simmons' Node microtime module + // detect Wade Simmons' Node.js `microtime` module if (microtimeObject && typeof (timer.ns = microtimeObject.now) == 'function') { timers.push({ 'ns': timer.ns, 'res': getRes('us'), 'unit': 'us' }); } @@ -2003,7 +2003,7 @@ if (queue.length < 2 && !maxedOut) { enqueue(); } - // abort the invoke cycle when done + // abort the `invoke` cycle when done event.aborted = done; } @@ -2214,7 +2214,7 @@ 'delay': 0.005, /** - * Displayed by Benchmark#toString when a `name` is not available + * Displayed by `Benchmark#toString` when a `name` is not available * (auto-generated if absent). * * @memberOf Benchmark.options @@ -2315,7 +2315,7 @@ /** * Platform object with properties describing things like browser name, - * version, and operating system. + * version, and operating system. See [`platform.js`](http://mths.be/platform). * * @static * @memberOf Benchmark diff --git a/vendor/curl/dist/curl-kitchen-sink/curl.js b/vendor/curl/dist/curl-kitchen-sink/curl.js index 044cca94b..c9370ef9a 100644 --- a/vendor/curl/dist/curl-kitchen-sink/curl.js +++ b/vendor/curl/dist/curl-kitchen-sink/curl.js @@ -1,49 +1,52 @@ (function(){/* MIT License (c) copyright 2010-2013 B Cavalier & J Hann MIT (c) copyright 2010-2013 B Cavalier & J Hann */ -(function(d){function h(){}function m(b,e){return 0==T.call(b).indexOf("[object "+e)}function r(b){return b&&"/"==b.charAt(b.length-1)?b.substr(0,b.length-1):b}function c(b,e){var l,g,D,a;l=1;g=b;"."==g.charAt(0)&&(D=!0,g=g.replace(U,function(b,e,g,D){g&&l++;return D||""}));if(D){D=e.split("/");a=D.length-l;if(0>a)return b;D.splice(a,l);return D.concat(g||[]).join("/")}return g}function n(b){var e=b.indexOf("!");return{g:b.substr(e+1),d:0<=e&&b.substr(0,e)}}function t(){}function k(b,e){t.prototype= -b||Q;var l=new t;t.prototype=Q;for(var g in e)l[g]=e[g];return l}function y(){function b(b,e,l){g.push([b,e,l])}function e(b,e){for(var l,D=0;l=g[D++];)(l=l[b])&&l(e)}var l,g,D;l=this;g=[];D=function(l,a){b=l?function(b){b&&b(a)}:function(b,e){e&&e(a)};D=h;e(l?0:1,a);e=h;g=G};this.l=function(e,g,D){b(e,g,D);return l};this.k=function(b){l.G=b;D(!0,b)};this.e=function(b){l.Ca=b;D(!1,b)};this.D=function(b){e(2,b)}}function v(b){return b instanceof y||b instanceof w}function q(b,e,l,g){v(b)?b.l(e,l,g): -e(b)}function x(b,e,l){var g;return function(){0<=--b&&e&&(g=e.apply(G,arguments));0==b&&l&&l(g);return g}}function a(){var b,e;s="";b=[].slice.call(arguments);m(b[0],"Object")&&(e=b.shift(),e=f(e));return new w(b[0],b[1],b[2],e)}function f(b,e,l){var g;s="";if(b&&(u.U(b),z=u.b(b),"preloads"in b&&(g=new w(b.preloads,G,l,J,!0),u.n(function(){J=g})),b=b.main))return new w(b,e,l)}function w(b,e,l,g,D){var a;a=u.i(z,G,[].concat(b),D);this.then=this.l=b=function(b,e){q(a,function(e){b&&b.apply(G,e)},function(b){if(e)e(b); -else throw b;});return this};this.next=function(b,e,g){return new w(b,e,g,a)};this.config=f;(e||l)&&b(e,l);u.n(function(){q(D||J,function(){q(g,function(){u.w(a)},l)})})}function A(b){var e,l;e=b.id;e==G&&(K!==G?K={K:"Multiple anonymous defines encountered"}:(e=u.ia())||(K=b));if(e!=G){l=E[e];e in E||(l=u.o(e,z),l=u.H(l.b,e),E[e]=l);if(!v(l))throw Error("duplicate define: "+e);l.na=!1;u.I(l,b)}}function C(){var b=u.fa(arguments);A(b)}var s,z,F,H,B=d.document,L=B&&(B.head||B.getElementsByTagName("head")[0]), -N=L&&L.getElementsByTagName("base")[0]||null,M={},I={},p={},V="addEventListener"in d?{}:{loaded:1,complete:1},Q={},T=Q.toString,G,E={},O={},J=!1,K,S=/^\/|^[^:]+:\/\//,U=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,W=/\/\*[\s\S]*?\*\/|\/\/.*?[\n\r]/g,X=/require\s*\(\s*(["'])(.*?[^\\])\1\s*\)|[^\\]?(["'])/g,Y=/\s*,\s*/,R,u;u={s:function(b,e,l){var g;b=c(b,e);if("."==b.charAt(0))return b;g=n(b);b=(e=g.d)||g.g;b in l.c&&(b=l.c[b].P||b);e&&(0>e.indexOf("/")&&!(e in l.c)&&(b=r(l.S)+"/"+e),b=b+"!"+g.g);return b},i:function(b, -e,l,g){function a(e,g){var l,p;l=u.s(e,c.id,b);if(!g)return l;p=n(l);if(!p.d)return l;l=E[p.d];p.g="normalize"in l?l.normalize(p.g,a,c.b)||"":a(p.g);return p.d+"!"+p.g}function p(e,l,n){var f;f=l&&function(b){l.apply(G,b)};if(m(e,"String")){if(f)throw Error("require(id, callback) not allowed");n=a(e,!0);e=E[n];if(!(n in E))throw Error("Module not resolved: "+n);return(n=v(e)&&e.a)||e}q(u.w(u.i(b,c.id,e,g)),f,n)}var c;c=new y;c.id=e||"";c.ja=g;c.J=l;c.b=b;c.r=p;p.toUrl=function(e){return u.o(a(e,!0), -b).url};c.s=a;return c},H:function(b,e,l){var g,a,p;g=u.i(b,e,G,l);a=g.k;p=x(1,function(b){g.v=b;try{return u.aa(g)}catch(e){g.e(e)}});g.k=function(b){q(l||J,function(){a(E[g.id]=O[g.url]=p(b))})};g.L=function(b){q(l||J,function(){g.a&&(p(b),g.D(I))})};return g},Z:function(b,e,l,g){return u.i(b,l,G,g)},ha:function(b){return b.r},N:function(b){return b.a||(b.a={})},ga:function(b){var e=b.A;e||(e=b.A={id:b.id,uri:u.O(b),exports:u.N(b),config:function(){return b.b}},e.a=e.exports);return e},O:function(b){return b.url|| -(b.url=u.t(b.r.toUrl(b.id),b.b))},U:function(b){var e,l,g,p,c;e="curl";l="define";g=p=d;if(b&&(c=b.overwriteApi||b.za,e=b.apiName||b.pa||e,g=b.apiContext||b.oa||g,l=b.defineName||b.ua||l,p=b.defineContext||b.ta||p,F&&m(F,"Function")&&(d.curl=F),F=null,H&&m(H,"Function")&&(d.define=H),H=null,!c)){if(g[e]&&g[e]!=a)throw Error(e+" already exists");if(p[l]&&p[l]!=C)throw Error(l+" already exists");}g[e]=a;p[l]=C},b:function(b){function e(b,e){var l,g,f,d,s;for(s in b){f=b[s];m(f,"String")&&(f={path:b[s]}); -f.name=f.name||s;d=a;g=n(r(f.name));l=g.g;if(g=g.d)d=p[g],d||(d=p[g]=k(a),d.c=k(a.c),d.f=[]),delete b[s];g=f;var h=e,q=void 0;g.path=r(g.path||g.location||"");h&&(q=g.main||"./main","."==q.charAt(0)||(q="./"+q),g.P=c(q,g.name+"/"));g.b=g.config;g.b&&(g.b=k(a,g.b));g.V=l.split("/").length;l?(d.c[l]=g,d.f.push(l)):d.p=u.T(f.path,a)}}function l(b){var e=b.c;b.R=RegExp("^("+b.f.sort(function(b,g){return e[g].V-e[b].V}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete b.f}var g,a,p,f;"baseUrl"in -b&&(b.p=b.baseUrl);"main"in b&&(b.P=b.main);"preloads"in b&&(b.Aa=b.preloads);"pluginPath"in b&&(b.S=b.pluginPath);if("dontAddFileExt"in b||b.j)b.j=RegExp(b.dontAddFileExt||b.j);g=z;a=k(g,b);a.c=k(g.c);p=b.plugins||{};a.plugins=k(g.plugins);a.C=k(g.C,b.C);a.B=k(g.B,b.B);a.f=[];e(b.packages,!0);e(b.paths,!1);for(f in p)b=u.s(f+"!","",a),a.plugins[b.substr(0,b.length-1)]=p[f];p=a.plugins;for(f in p)if(p[f]=k(a,p[f]),b=p[f].f)p[f].f=b.concat(a.f),l(p[f]);for(f in g.c)a.c.hasOwnProperty(f)||a.f.push(f); -l(a);return a},o:function(b,e){var l,g,a,p;l=e.c;a=S.test(b)?b:b.replace(e.R,function(b){g=l[b]||{};p=g.b;return g.path||""});return{b:p||z,url:u.T(a,e)}},T:function(b,e){var a=e.p;return a&&!S.test(b)?r(a)+"/"+b:b},t:function(b,e){return b+((e||z).j.test(b)?"":".js")},m:function(b,e,a){var g=B.createElement("script");g.onload=g.onreadystatechange=function(a){a=a||d.event;if("load"==a.type||V[g.readyState])delete p[b.id],g.onload=g.onreadystatechange=g.onerror="",e()};g.onerror=function(){a(Error("Syntax or http error: "+ -b.url))};g.type=b.q||"text/javascript";g.charset="utf-8";g.async=!b.Q;g.src=b.url;p[b.id]=g;L.insertBefore(g,N);return g},M:function(b){var e=[],a;("string"==typeof b?b:b.toSource?b.toSource():b.toString()).replace(W,"").replace(X,function(b,p,f,c){c?a=a==c?G:a:a||e.push(f);return""});return e},fa:function(b){var e,a,g,p,f,c;f=b.length;g=b[f-1];p=m(g,"Function")?g.length:-1;2==f?m(b[0],"Array")?a=b[0]:e=b[0]:3==f&&(e=b[0],a=b[1]);!a&&0n.status?r(n.responseText):c(Error("fetchText() failed. status: "+n.statusText)))};n.send(null)}});define("curl/plugin/text",["./_fetchText"],function(d){function h(d){throw d;}return{load:function(m,r,c){d(r.toUrl(m),c,c.error||h)},cramPlugin:"../cram/text"}}); -define("curl/plugin/async",function(){return{load:function(d,h,m){function r(c){"function"==typeof m.error&&m.error(c)}h([d],function(c){"function"==typeof c.l?c.l(function(d){0==arguments.length&&(d=c);m(d)},r):m(c)},m.error||function(c){throw c;})},analyze:function(d,h,m){m(d)}}}); -(function(d){function h(){var a;a=s[A]("link");a.rel="stylesheet";a.type="text/css";return a}function m(a,c){a.onload=function(){I.load=I.load||!0;c()}}function r(a,c){a.onerror=function(){I.error=I.error||!0;c()}}function c(a,c,f){B.push({url:a,X:c,$:function(){f(Error(M))}});(a=t())&&n(a)}function n(a){var c,f;c=B.shift();f=a.styleSheet;c?(a.onload=function(){c.X(c.la);n(a)},a.onerror=function(){c.$();n(a)},c.la=f.imports[f.addImport(c.url)]):(a.onload=a.onerror=w,H.push(a))}function t(){var a; -a=H.shift();!a&&F.lengthb)return a;B.splice(b,m);return B.concat(f||[]).join("/")}return f}function q(a){var e=a.indexOf("!");return{g:a.substr(e+1),d:0<=e&&a.substr(0,e)}}function t(){}function h(a,e){t.prototype= +a||R;var m=new t;t.prototype=R;for(var f in e)m[f]=e[f];return m}function x(){function a(a,e,m){f.push([a,e,m])}function e(a,e){for(var m,B=0;m=f[B++];)(m=m[a])&&m(e)}var m,f,B;m=this;f=[];B=function(m,b){a=m?function(a){a&&a(b)}:function(a,e){e&&e(b)};B=l;e(m?0:1,b);e=l;f=G};this.then=function(e,f,B){a(e,f,B);return m};this.i=function(a){m.I=a;B(!0,a)};this.e=function(a){m.Ea=a;B(!1,a)};this.G=function(a){e(2,a)}}function v(a){return a instanceof x||a instanceof z}function p(a,e,m,f){v(a)?a.then(e, +m,f):e(a)}function y(a,e,m){var f;return function(){0<=--a&&e&&(f=e.apply(G,arguments));0==a&&m&&m(f);return f}}function k(a,e){this.P=a;this.id=e}function b(){var a,e;w="";a=[].slice.call(arguments);g(a[0],"Object")&&(e=a.shift(),e=A(e));return new z(a[0],a[1],a[2],e)}function A(a,e,m){var f;w="";if(a&&(s.X(a),F=s.b(a),"preloads"in a&&(f=new z(a.preloads,G,m,L,!0),s.l(function(){L=f})),a=a.main))return new z(a,e,m)}function z(a,e,m,f,B){var b;b=s.j(F,G,[].concat(a),B);this.then=this.then=a=function(a, +e){p(b,function(e){a&&a.apply(G,s.w(e))},function(a){if(e)e(a);else throw a;});return this};this.next=function(a,e,f){return new z(a,e,f,b)};this.config=A;(e||m)&&a(e,m);s.l(function(){p(B||L,function(){p(f,function(){s.B(b)},m)})})}function D(a){var e,m,f;e=a.id;e==G&&(M!==G?M={M:"Multiple anonymous defines encountered"}:(e=s.la())||(M=a));if(e!=G){m=E[e];e in E||(f=s.n(e,F),m=s.J(f.b,e),E[e]=m);if(!v(m))throw Error("duplicate define: "+e);m.qa=!1;s.l(function(){s.K(m,a)},!0)}}function r(){var a= +s.ia(arguments);D(a)}var w,F,H,C,I=d.document,K=I&&(I.head||I.getElementsByTagName("head")[0]),N=K&&K.getElementsByTagName("base")[0]||null,J={},u={},O={},W="addEventListener"in d?{}:{loaded:1,complete:1},R={},U=R.toString,G,E={},P={},L=!1,M,T=/^\/|^[^:]+:\/\//,V=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,X=/\/\*[\s\S]*?\*\/|\/\/.*?[\n\r]/g,Y=/require\s*\(\s*(["'])(.*?[^\\])\1\s*\)|[^\\]?(["'])/g,Z=/\s*,\s*/,S,s;k.prototype.A=function(){return this.P()};s={s:function(a,e,m){var f;a=c(a,e);if("."==a.charAt(0))return a; +f=q(a);a=(e=f.d)||f.g;a in m.c&&(a=m.c[a].S||a);e&&(0>e.indexOf("/")&&!(e in m.c)&&(a=n(m.V)+"/"+e),a=a+"!"+f.g);return a},p:function(a){return a&&a.A===k.prototype.A?E[a.id]=a.A():a},w:function(a){for(var e=[],m=0;mq.status?l(q.responseText):c(Error("fetchText() failed. status: "+q.statusText)))};q.send(null)}});define("curl/plugin/text",["./_fetchText"],function(d){function l(d){throw d;}return{load:function(g,n,c){d(n.toUrl(g),c,c.error||l)},cramPlugin:"../cram/text"}}); +define("curl/plugin/async",function(){return{load:function(d,l,g){function n(c){"function"==typeof g.error&&g.error(c)}l([d],function(c){"function"==typeof c.then?c.then(function(d){0==arguments.length&&(d=c);g(d)},n):g(c)},g.error||function(c){throw c;})},analyze:function(d,l,g){g(d)}}}); +(function(d){function l(){var b;b=r[z]("link");b.rel="stylesheet";b.type="text/css";return b}function g(b,c){b.onload=function(){J.load=J.load||!0;c()}}function n(b,c){b.onerror=function(){J.error=J.error||!0;c()}}function c(b,c,d){C.push({url:b,$:c,ca:function(){d(Error(N))}});(b=t())&&q(b)}function q(b){var c,d;c=C.shift();d=b.styleSheet;c?(b.onload=function(){c.$(c.oa);q(b)},b.onerror=function(){c.ca();q(b)},c.oa=d.imports[d.addImport(c.url)]):(b.onload=b.onerror=A,H.push(b))}function t(){var b; +b=H.shift();!b&&F.length