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

queued-socket.io

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queued-socket.io - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

24

dist/queue.js

@@ -8,14 +8,4 @@ 'use strict';

var _lodash = require('lodash.foreach');
var _lodash2 = _interopRequireDefault(_lodash);
var _lodash3 = require('lodash.sortby');
var _lodash4 = _interopRequireDefault(_lodash3);
var _socket = require('./socket');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }

@@ -50,6 +40,16 @@

var sortedItems = (0, _lodash4.default)(items, 'priority');
var sortedItems = items.sort(function (a, b) {
if (a.priority < b.priority) {
return -1;
}
(0, _lodash2.default)(sortedItems, callback);
if (a.priority > b.priority) {
return 1;
}
return 0;
});
sortedItems.forEach(callback);
return flush();

@@ -56,0 +56,0 @@ }

{
"name": "queued-socket.io",
"version": "1.0.1",
"version": "1.0.2",
"description": "Socket.io client with offline queue",
"main": "./dist/index.js",
"main": "dist/index.js",
"scripts": {

@@ -18,2 +18,9 @@ "build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir dist",

},
"repository": {
"type": "git",
"url": "git+https://github.com/anchorchat/queued-socket.io.git"
},
"bugs": {
"url": "https://github.com/anchorchat/queued-socket.io/issues"
},
"files": [

@@ -34,5 +41,3 @@ "dist",

"dependencies": {
"debug": "^3.1.0",
"lodash.foreach": "^4.5.0",
"lodash.sortby": "^4.7.0"
"debug": "^3.1.0"
},

@@ -39,0 +44,0 @@ "devDependencies": {

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

import forEach from 'lodash.foreach';
import sortBy from 'lodash.sortby';
import { getClient } from './socket';

@@ -49,6 +47,16 @@

const sortedItems = sortBy(items, 'priority');
const sortedItems = items.sort((a, b) => {
if (a.priority < b.priority) {
return -1;
}
forEach(sortedItems, callback);
if (a.priority > b.priority) {
return 1;
}
return 0;
});
sortedItems.forEach(callback);
return flush();

@@ -55,0 +63,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