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

axiosist

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axiosist - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

4

index.d.ts
/// <reference types="node" />
import { IncomingMessage, ServerResponse } from "http";
import { IncomingMessage, ServerResponse, Server } from "http";
import { AxiosAdapter, AxiosInstance } from "axios";
declare type RequestListener = (request: IncomingMessage, response: ServerResponse) => void;
declare const createAdapter: (callback: RequestListener) => AxiosAdapter;
declare const axiosist: (callback: RequestListener) => AxiosInstance;
declare const axiosist: (callback: RequestListener | Server) => AxiosInstance;
export { createAdapter };
export default axiosist;

@@ -24,3 +24,3 @@ 'use strict'

const server = http.createServer(callback)
const server = typeof callback === 'function' ? http.createServer(callback) : callback

@@ -27,0 +27,0 @@ return new Promise((resolve, reject) => {

{
"name": "axiosist",
"version": "0.3.0",
"version": "0.3.1",
"description": "Convert node.js request handler to axios adapter",

@@ -28,2 +28,5 @@ "main": "index.js",

"homepage": "https://github.com/Gerhut/axiosist#readme",
"engines": {
"node": ">=6.9.0"
},
"dependencies": {

@@ -33,3 +36,3 @@ "axios": "^0.18.0"

"devDependencies": {
"@types/node": "^10.11.7",
"@types/node": ">=6.9.0",
"ava": "^1.0.1",

@@ -36,0 +39,0 @@ "nyc": "^13.0.1",

import test from 'ava'
import * as http from 'http'
import axiosist from '.'

@@ -94,1 +95,9 @@

}))
test('should work with http server', t => {
const app = http.createServer((req, res) => {
res.end('foo')
})
return axiosist(app).get('/').then(() => t.pass())
})

Sorry, the diff of this file is not supported yet

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