Socket
Socket
Sign inDemoInstall

twilio-sync

Package Overview
Dependencies
Maintainers
2
Versions
608
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twilio-sync - npm Package Compare versions

Comparing version 0.4.2-dev.4-build.199 to 0.4.2-dev.5-build.201

44

browser/syncmap.js

@@ -748,36 +748,18 @@ "use strict";

value: function forEach(handler) {
return new _promise2.default(function (reject) {
/*
if (this._cacheState.ensured) {
this.items.forEach(handler);
resolve();
} else {
let firstPageQueryArgs = {
order: 'asc',
limit: 50
};
let getFirstPage = () => this._query(firstPageQueryArgs);
let handleEnd = () => {
this._cacheState.ensured = true;
resolve();
};
this._processPage(getFirstPage, handler, handleEnd).catch(reject);
var _this5 = this;
return new _promise2.default(function (resolve, reject) {
function processPage(page) {
page.items.forEach(function (x) {
return handler(x);
});
if (page.hasNextPage) {
page.nextPage().then(processPage);
} else {
resolve();
}
}
*/
reject(new Error('Not implemented'));
_this5.queryItems().then(processPage);
});
}
/*
private _processPage(getPage :any, handleElement :any, handleEnd :any) : Promise<Paginator<Item>> {
return getPage().then(page => {
page.items.forEach(el => handleElement(el));
if (page.hasNextPage) {
setTimeout(() => this._processPage(page.nextPage.bind(page), handleElement, handleEnd));
} else {
handleEnd();
}
});
}
*/
}, {

@@ -784,0 +766,0 @@ key: "shouldIgnoreEvent",

@@ -119,3 +119,3 @@ import { SyncEntity, EntityServices } from './entity';

*/
protected queryItems(args: any): Promise<Paginator<Item>>;
protected queryItems(args?: any): Promise<Paginator<Item>>;
/**

@@ -130,3 +130,3 @@ * Get a list of items from the Map

*/
getItems(args: any): Promise<Paginator<Item>>;
getItems(args?: any): Promise<Paginator<Item>>;
/**

@@ -133,0 +133,0 @@ * Synchronizes object with state on a server

@@ -342,35 +342,15 @@ "use strict";

forEach(handler) {
return new Promise((reject) => {
/*
if (this._cacheState.ensured) {
this.items.forEach(handler);
resolve();
} else {
let firstPageQueryArgs = {
order: 'asc',
limit: 50
};
let getFirstPage = () => this._query(firstPageQueryArgs);
let handleEnd = () => {
this._cacheState.ensured = true;
resolve();
};
this._processPage(getFirstPage, handler, handleEnd).catch(reject);
return new Promise((resolve, reject) => {
function processPage(page) {
page.items.forEach(x => handler(x));
if (page.hasNextPage) {
page.nextPage().then(processPage);
}
else {
resolve();
}
}
*/
reject(new Error('Not implemented'));
this.queryItems().then(processPage);
});
}
/*
private _processPage(getPage :any, handleElement :any, handleEnd :any) : Promise<Paginator<Item>> {
return getPage().then(page => {
page.items.forEach(el => handleElement(el));
if (page.hasNextPage) {
setTimeout(() => this._processPage(page.nextPage.bind(page), handleElement, handleEnd));
} else {
handleEnd();
}
});
}
*/
shouldIgnoreEvent(key, eventId) {

@@ -377,0 +357,0 @@ return this.cache.isKnown(key, eventId);

{
"name": "twilio-sync",
"version": "0.4.2-dev.4-build.199",
"version": "0.4.2-dev.5-build.201",
"description": "Twilio Sync client library",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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