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

marsdb

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marsdb - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

36

dist/CursorObservable.js

@@ -46,2 +46,6 @@ 'use strict';

// Defaults
var _defaultDebounce = 1000 / 60;
var _defaultBatchSize = 10;
/**

@@ -60,3 +64,3 @@ * Observable cursor is used for making request auto-updatable

_this.update = (0, _debounce2.default)((0, _bind3.default)(_this.update, _this), 1000 / 15, 10);
_this.update = (0, _debounce2.default)((0, _bind3.default)(_this.update, _this), _defaultDebounce, _defaultBatchSize);
_this.maybeUpdate = (0, _bind3.default)(_this.maybeUpdate, _this);

@@ -66,14 +70,14 @@ return _this;

/**
* Change a batch size of updater.
* Btach size is a number of changes must be happen
* in debounce interval to force execute debounced
* function (update a result, in our case)
*
* @param {Number} batchSize
* @return {CursorObservable}
*/
_createClass(CursorObservable, [{
key: 'batchSize',
/**
* Change a batch size of updater.
* Btach size is a number of changes must be happen
* in debounce interval to force execute debounced
* function (update a result, in our case)
*
* @param {Number} batchSize
* @return {CursorObservable}
*/
value: function batchSize(_batchSize) {

@@ -297,2 +301,12 @@ this.update.updateBatchSize(_batchSize);

}
}], [{
key: 'defaultDebounce',
value: function defaultDebounce(waitTime) {
_defaultDebounce = waitTime;
}
}, {
key: 'defaultBatchSize',
value: function defaultBatchSize(batchSize) {
_defaultBatchSize = batchSize;
}
}]);

@@ -299,0 +313,0 @@

@@ -10,2 +10,6 @@ import _bind from 'fast.js/function/bind';

// Defaults
let _defaultDebounce = 1000 / 60;
let _defaultBatchSize = 10;
/**

@@ -18,6 +22,18 @@ * Observable cursor is used for making request auto-updatable

super(db, query, options);
this.update = debounce(_bind(this.update, this), 1000 / 15, 10);
this.update = debounce(
_bind(this.update, this),
_defaultDebounce,
_defaultBatchSize
);
this.maybeUpdate = _bind(this.maybeUpdate, this);
}
static defaultDebounce(waitTime) {
_defaultDebounce = waitTime;
}
static defaultBatchSize(batchSize) {
_defaultBatchSize = batchSize;
}
/**

@@ -24,0 +40,0 @@ * Change a batch size of updater.

{
"name": "marsdb",
"version": "0.5.1",
"version": "0.5.2",
"author": {

@@ -5,0 +5,0 @@ "name": "Artem Artemev",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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