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

qyu

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qyu - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

2

package.json
{
"name": "qyu",
"version": "0.4.0",
"version": "0.4.1",
"description": "A general-purpose asynchronous job queue for Node.js",

@@ -5,0 +5,0 @@ "keywords": [

@@ -13,6 +13,6 @@ # Qyu

// Basic:
q.add(myAsyncFunction);
q(myAsyncFunction);
// Extra options:
q.add(myAsyncFunction, {priority: 7}, arg1, arg2 /*, ...*/));
q(myAsyncFunction, {priority: 7}, arg1, arg2 /*, ...*/));

@@ -24,3 +24,3 @@ // Doesn't matter if more jobs come around later,

for (let i=0; i<10; i++) {
q.add(myAsyncFunction);
q(myAsyncFunction);
}

@@ -65,11 +65,11 @@ }, 2000);

(async () => {
let siteUrl = 'http://www.store-to-crawl.com/products';
let q = new Qyu({concurrency: 3});
const siteUrl = 'http://www.store-to-crawl.com/products';
const q = new Qyu({concurrency: 3});
for (let i=1; i<=10; i++) {
q.add(async () => {
let { data: html } = await axios(siteUrl+'?page='+i);
let $ = cheerio.load(html);
let products = []
$('.prod-list .product').each((i, elem) => {
q(async () => {
let resp = await axios(siteUrl+'?page='+i);
let $ = cheerio.load(resp.data);
let products = [];
$('.product-list .product').each((i, elem) => {
let $elem = $(elem);

@@ -76,0 +76,0 @@ let title = $elem.find('.title').text();

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