UNPKG

bootstrap-vue

Version:

BootstrapVue provides one of the most comprehensive implementations of Bootstrap 4 components and grid system for Vue.js and with extensive and automated WAI-ARIA accessibility markup.

69 lines (61 loc) 2.25 kB
/** * Aliasing Object[method] allows the minifier to shorten methods to a single character variable, * as well as giving BV a chance to inject polyfills. * As long as we avoid * - import * as Object from "utils/object" * all unused exports should be removed by tree-shaking. */ // @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign if (typeof Object.assign !== 'function') { Object.assign = function (target, varArgs) { // .length of function is 2 if (target == null) { // TypeError if undefined or null throw new TypeError('Cannot convert undefined or null to object'); } var to = Object(target); for (var index = 1; index < arguments.length; index++) { var nextSource = arguments[index]; if (nextSource != null) { // Skip over if undefined or null for (var nextKey in nextSource) { // Avoid bugs when hasOwnProperty is shadowed if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { to[nextKey] = nextSource[nextKey]; } } } } return to; }; } // @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#Polyfill if (!Object.is) { Object.is = function (x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN // eslint-disable-next-line no-self-compare return x !== x && y !== y; } }; } export var assign = Object.assign; export var getOwnPropertyNames = Object.getOwnPropertyNames; export var keys = Object.keys; export var defineProperties = Object.defineProperties; export var defineProperty = Object.defineProperty; export var freeze = Object.freeze; export var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; export var getOwnPropertySymbols = Object.getOwnPropertySymbols; export var getPrototypeOf = Object.getPrototypeOf; export var create = Object.create; export var isFrozen = Object.isFrozen; export var is = Object.is; export function readonlyDescriptor() { return { enumerable: true, configurable: false, writable: false }; }