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

axios-chrome-messaging-adapter2

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-chrome-messaging-adapter2 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

lib/index.d.ts

@@ -1,1 +0,1 @@

export {};
export declare const axiosInstance: import("axios").AxiosInstance;

@@ -0,2 +1,7 @@

import axios from 'axios';
import { registerMessageHandler } from "./registerMessageHandler";
import { adapter } from "./adapter";
registerMessageHandler();
export var axiosInstance = axios.create({
adapter: adapter,
});
{
"name": "axios-chrome-messaging-adapter2",
"version": "1.0.0",
"version": "1.0.1",
"main": "lib",

@@ -5,0 +5,0 @@ "scripts": {

@@ -0,13 +1,9 @@

For CORS request in chrome extensions,support chrome edge firefox.
### Quick start
If you are using a bundler, like webpack or rollup:, you'll just need to **`require`** the lib. If you are using a CDN, the lib will be available under **`window.axiosChromeMessagingAdapter`**.
In your **background** script:
```javascript
import axios from 'axios';
import { registerMessageHandler } from 'axios-chrome-messaging-adapter';
// register the adapter message hanlder
registerMessageHandler();
import 'axios-chrome-messaging-adapter2';
```

@@ -19,3 +15,3 @@

import axios from 'axios'
import { adapter } from 'axios-chrome-messaging-adapter'
import { adapter } from 'axios-chrome-messaging-adapter2'

@@ -22,0 +18,0 @@ // tell axios to use the adapter for this request

@@ -0,3 +1,9 @@

import axios from 'axios';
import {registerMessageHandler} from "./registerMessageHandler";
import {adapter} from "./adapter";
registerMessageHandler();
export const axiosInstance = axios.create({
adapter,
})
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