@brandingbrand/polyfills
Advanced tools
Comparing version 11.71.1 to 11.71.2
@@ -5,2 +5,11 @@ # Changelog | ||
## [11.71.2](https://github.com/brandingbrand/shipyard/compare/v11.71.1...v11.71.2) (2022-09-20) | ||
### Bug Fixes | ||
* **polyfills:** working globalThis polyfill ([0b8ca4a](https://github.com/brandingbrand/shipyard/commit/0b8ca4aad1bce60dadd39bdad65daf7c777289ff)) | ||
## [11.71.1](https://github.com/brandingbrand/shipyard/compare/v11.71.0...v11.71.1) (2022-09-19) | ||
@@ -7,0 +16,0 @@ |
{ | ||
"name": "@brandingbrand/polyfills", | ||
"version": "11.71.1", | ||
"version": "11.71.2", | ||
"license": "MIT", | ||
@@ -8,4 +8,4 @@ "main": "./src/index.js", | ||
"dependencies": { | ||
"@brandingbrand/utils-base64": "11.71.2", | ||
"symbol-observable": "^4.0.0", | ||
"@brandingbrand/utils-base64": "11.71.1", | ||
"tslib": "^2.0.0" | ||
@@ -12,0 +12,0 @@ }, |
import 'symbol-observable'; | ||
import './global-this'; | ||
import './global-this.polyfill'; | ||
import './base64.polyfill'; | ||
import './array/flat.polyfill'; | ||
import './array/flat-map.polyfill'; | ||
import './object/from-entries.polyfill'; |
@@ -1,47 +0,7 @@ | ||
/* eslint-disable no-extend-native */ | ||
import 'symbol-observable'; | ||
import './global-this'; | ||
import base64 from '@brandingbrand/utils-base64'; | ||
if (!global.btoa) { | ||
global.btoa = base64.encode; | ||
} | ||
if (!global.atob) { | ||
global.atob = base64.decode; | ||
} | ||
if (!Object.fromEntries) { | ||
Object.fromEntries = (arr) => [...arr].reduce((acc, curr) => { | ||
acc[curr[0]] = curr[1]; | ||
return acc; | ||
}, {}); | ||
} | ||
if (!Array.prototype.flat) { | ||
Object.defineProperty(Array.prototype, 'flat', { | ||
configurable: true, | ||
value: function flat(...args) { | ||
var _a; | ||
const depth = isNaN((_a = args[0]) !== null && _a !== void 0 ? _a : Number.NaN) ? 1 : Number(args[0]); | ||
return depth | ||
? Array.prototype.reduce.call(this, (acc, cur) => { | ||
if (Array.isArray(cur)) { | ||
acc.push.apply(acc, flat.call(cur, depth - 1)); | ||
} | ||
else { | ||
acc.push(cur); | ||
} | ||
return acc; | ||
}, []) | ||
: Array.prototype.slice.call(this); | ||
}, | ||
writable: true, | ||
}); | ||
} | ||
if (!Array.prototype.flatMap) { | ||
Object.defineProperty(Array.prototype, 'flatMap', { | ||
configurable: true, | ||
value: function flatMap(...args) { | ||
return Array.prototype.map.apply(this, args).flat(); | ||
}, | ||
writable: true, | ||
}); | ||
} | ||
import './global-this.polyfill'; | ||
import './base64.polyfill'; | ||
import './array/flat.polyfill'; | ||
import './array/flat-map.polyfill'; | ||
import './object/from-entries.polyfill'; | ||
//# sourceMappingURL=index.js.map |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13148
24
80
+ Added@brandingbrand/utils-base64@11.71.2(transitive)
- Removed@brandingbrand/utils-base64@11.71.1(transitive)