node-query/node_modules/es6-shim/es6-shim.min.js

11 lines
26 KiB
JavaScript
Raw Normal View History

2014-10-28 14:36:39 -04:00
/*!
* https://github.com/paulmillr/es6-shim
* @license es6-shim Copyright 2013-2014 by Paul Miller (http://paulmillr.com)
* and contributors, MIT License
* es6-shim: v0.20.1
* see https://github.com/paulmillr/es6-shim/blob/master/LICENSE
* Details and documentation:
* https://github.com/paulmillr/es6-shim/
*/
(function(e,t){if(typeof define==="function"&&define.amd){define(t)}else if(typeof exports==="object"){module.exports=t()}else{e.returnExports=t()}})(this,function(e){"use strict";var t=function(e){try{e()}catch(t){return false}return true};var r=function(e,t){try{var r=function(){e.apply(this,arguments)};if(!r.__proto__){return false}Object.setPrototypeOf(r,e);r.prototype=Object.create(e.prototype,{constructor:{value:e}});return t(r)}catch(n){return false}};var n=function(){try{Object.defineProperty({},"x",{});return true}catch(e){return false}};var a=function(){var e=false;if(String.prototype.startsWith){try{"/a/".startsWith(/a/)}catch(t){e=true}}return e};var i=new Function("return this;");var o=i();var u=o.isFinite;var s=!!Object.defineProperty&&n();var f=a();var c=Array.prototype.slice;var l=String.prototype.indexOf;var h=Object.prototype.toString;var v=Object.prototype.hasOwnProperty;var p;var y=function(e,t,r,n){if(!n&&t in e){return}if(s){Object.defineProperty(e,t,{configurable:true,enumerable:false,writable:true,value:r})}else{e[t]=r}};var b=function(e,t){Object.keys(t).forEach(function(r){var n=t[r];y(e,r,n,false)})};var g=Object.create||function(e,t){function r(){}r.prototype=e;var n=new r;if(typeof t!=="undefined"){b(n,t)}return n};var m=typeof Symbol==="function"&&Symbol.iterator||"_es6shim_iterator_";if(o.Set&&typeof(new o.Set)["@@iterator"]==="function"){m="@@iterator"}var d=function(e,t){if(!t){t=function n(){return this}}var r={};r[m]=t;b(e,r);if(!e[m]&&typeof m==="symbol"){e[m]=t}};var w=function B(e){var t=h.call(e);var r=t==="[object Arguments]";if(!r){r=t!=="[object Array]"&&e!==null&&typeof e==="object"&&typeof e.length==="number"&&e.length>=0&&h.call(e.callee)==="[object Function]"}return r};var j=function(e){if(!I.TypeIsObject(e)){throw new TypeError("bad object")}if(!e._es6construct){if(e.constructor&&I.IsCallable(e.constructor["@@create"])){e=e.constructor["@@create"](e)}b(e,{_es6construct:true})}return e};var I={CheckObjectCoercible:function(e,t){if(e==null){throw new TypeError(t||"Cannot call method on "+e)}return e},TypeIsObject:function(e){return e!=null&&Object(e)===e},ToObject:function(e,t){return Object(I.CheckObjectCoercible(e,t))},IsCallable:function(e){return typeof e==="function"&&h.call(e)==="[object Function]"},ToInt32:function(e){return e>>0},ToUint32:function(e){return e>>>0},ToInteger:function(e){var t=+e;if(Number.isNaN(t)){return 0}if(t===0||!Number.isFinite(t)){return t}return(t>0?1:-1)*Math.floor(Math.abs(t))},ToLength:function(e){var t=I.ToInteger(e);if(t<=0){return 0}if(t>Number.MAX_SAFE_INTEGER){return Number.MAX_SAFE_INTEGER}return t},SameValue:function(e,t){if(e===t){if(e===0){return 1/e===1/t}return true}return Number.isNaN(e)&&Number.isNaN(t)},SameValueZero:function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)},IsIterable:function(t){return I.TypeIsObject(t)&&(t[m]!==e||w(t))},GetIterator:function(e){if(w(e)){return new p(e,"value")}var t=e[m]();if(!I.TypeIsObject(t)){throw new TypeError("bad iterator")}return t},IteratorNext:function(e){var t=arguments.length>1?e.next(arguments[1]):e.next();if(!I.TypeIsObject(t)){throw new TypeError("bad iterator")}return t},Construct:function(e,t){var r;if(I.IsCallable(e["@@create"])){r=e["@@create"]()}else{r=g(e.prototype||null)}b(r,{_es6construct:true});var n=e.apply(r,t);return I.TypeIsObject(n)?n:r}};var O=function(){function e(e){var t=Math.floor(e),r=e-t;if(r<.5){return t}if(r>.5){return t+1}return t%2?t+1:t}function t(t,r,n){var a=(1<<r-1)-1,i,o,u,s,f,c,l,h;if(t!==t){o=(1<<r)-1;u=Math.pow(2,n-1);i=0}else if(t===Infinity||t===-Infinity){o=(1<<r)-1;u=0;i=t<0?1:0}else if(t===0){o=0;u=0;i=1/t===-Infinity?1:0}else{i=t<0;t=Math.abs(t);if(t>=Math.pow(2,1-a)){o=Math.min(Math.floor(Math.log(t)/Math.LN2),1023);u=e(t/Math.pow(2,o)*Math.pow(2,n));if(u/Math.pow(2,n)>=2){o=o+1;u=1}if(o>a){o=(1<<r)-1;u=0}else{o=o+a;u=u-Math.pow(2,n)}}else{o=0;u=e(t/Math.pow(2,1-a-n))}}c=[];for(f=n;f;f-=1){c.push(u%2?1:0);u=Math.floor(u/2)}for(f=r;f;f-=1){c.push(o%2?1:0);o=Math.floor(o/2)}c.push(i?1:0);c.reverse();l=c.join("");h=[];while(l.length){h.p
//# sourceMappingURL=es6-shim.map