Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bv-ui-core

Package Overview
Dependencies
Maintainers
12
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bv-ui-core - npm Package Compare versions

Comparing version 0.14.1 to 0.14.2

lib/polyfills/fetch.js

22

lib/polyfills/README.md
# Polyfills!
The polyfills contained in this folder can be imported as necessary. They should
export either the built-in being polyfilled, if found on the global, or the
polyfill.
export either the builtin native function(s), if found on the global, or the
polyfill itself.

@@ -17,2 +17,12 @@ ## Usage

```js
const { fetch, Headers } = require('bv-ui-core/lib/polyfills/fetch')
// Do things with the fetch polyfill!
fetch(url, {
headers: new Headers({
'Accept': 'application/json',
}),
}).then(myCallback)
```
**In webpack**

@@ -22,8 +32,10 @@

plugins: [
// Any references to these items in the bundle will be wrapped in
// references to their respective polyfill module exports.
new webpack.ProvidePlugin({
// Any Promise references in the bundle will be wrapped in references to
// the polyfill.
Promise: 'bv-ui-core/lib/polyfill/promise'
Promise: 'bv-ui-core/lib/polyfill/promise',
fetch: ['bv-ui-core/lib/polyfill/fetch', 'fetch'],
Headers: ['bv-ui-core/lib/polyfill/fetch', 'Headers'],
})
]
```
{
"name": "bv-ui-core",
"version": "0.14.1",
"version": "0.14.2",
"license": "Apache 2.0",

@@ -53,3 +53,6 @@ "description": "Bazaarvoice UI-related JavaScript",

}
},
"dependencies": {
"whatwg-fetch": "^2.0.3"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc