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

aria2

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aria2 - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

.prettierignore

4

.vscode/settings.json
{
"editor.formatOnSave": true
}
"editor.formatOnSave": true
}

@@ -12,3 +12,3 @@ "use strict";

const WebSocket = global.WebSocket || _WebSocket;
const fetch = global.fetch || _fetch;
const fetch = global.fetch ? global.fetch.bind(global) : _fetch;

@@ -40,3 +40,3 @@ class JSONRPCClient extends EventEmitter {

async websocket(message) {
websocket(message) {
return new Promise((resolve, reject) => {

@@ -53,3 +53,3 @@ const cb = err => {

async http(message) {
const fetch = this.fetch(this.url("http"), {
const response = this.fetch(this.url("http"), {
method: "POST",

@@ -63,7 +63,7 @@ body: JSON.stringify(message),

fetch.then(async res => {
response.then(async res => {
this._onmessage(await res.json());
});
return await fetch;
return response;
}

@@ -70,0 +70,0 @@

{
"name": "aria2",
"version": "4.0.2",
"version": "4.0.3",
"description": "Library and cli for aria2, \"The next generation download utility.\"",

@@ -32,9 +32,9 @@ "homepage": "https://github.com/sonnyp/aria2.js",

"dependencies": {
"commander": "^2.16.0",
"node-fetch": "^2.1.2",
"ws": "^5.2.2"
"commander": "^2.17.1",
"node-fetch": "^2.2.0",
"ws": "^6.0.0"
},
"devDependencies": {
"ava": "^0.25.0",
"prettier": "1.13.7"
"prettier": "1.14.2"
},

@@ -41,0 +41,0 @@ "engines": {

@@ -43,14 +43,10 @@ # aria2.js

Start aria2c in daemon mode with
Start aria2 with rpc, example:
`aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all`
Install aria2
Install aria2.js
`npm install aria2`
```javascript
const Aria2 = require("aria2");
```
[↑](#aria2js)

@@ -61,2 +57,3 @@

```javascript
const Aria2 = require("aria2");
const aria2 = new Aria2([options]);

@@ -199,3 +196,3 @@ ```

// emitted when the WebSocket is open.
aria2.on('open' () => {
aria2.on('open', () => {
console.log('aria2 OPEN');

@@ -205,3 +202,3 @@ });

// emitted when the WebSocket is closed.
aria2.on('close' () => {
aria2.on('close', () => {
console.log('aria2 CLOSE');

@@ -208,0 +205,0 @@ });

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