_setup.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Current version.
  2. export var VERSION = '1.13.1';
  3. // Establish the root object, `window` (`self`) in the browser, `global`
  4. // on the server, or `this` in some virtual machines. We use `self`
  5. // instead of `window` for `WebWorker` support.
  6. export var root = typeof self == 'object' && self.self === self && self ||
  7. typeof global == 'object' && global.global === global && global ||
  8. Function('return this')() ||
  9. {};
  10. // Save bytes in the minified (but not gzipped) version:
  11. export var ArrayProto = Array.prototype, ObjProto = Object.prototype;
  12. export var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
  13. // Create quick reference variables for speed access to core prototypes.
  14. export var push = ArrayProto.push,
  15. slice = ArrayProto.slice,
  16. toString = ObjProto.toString,
  17. hasOwnProperty = ObjProto.hasOwnProperty;
  18. // Modern feature detection.
  19. export var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
  20. supportsDataView = typeof DataView !== 'undefined';
  21. // All **ECMAScript 5+** native function implementations that we hope to use
  22. // are declared here.
  23. export var nativeIsArray = Array.isArray,
  24. nativeKeys = Object.keys,
  25. nativeCreate = Object.create,
  26. nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
  27. // Create references to these builtin functions because we override them.
  28. export var _isNaN = isNaN,
  29. _isFinite = isFinite;
  30. // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
  31. export var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
  32. export var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
  33. 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
  34. // The largest integer that can be represented exactly.
  35. export var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;