New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

potion-client

Package Overview
Dependencies
Maintainers
2
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

potion-client - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

8

base.d.ts

@@ -87,2 +87,4 @@ export declare function readonly(target: any, property: any): void;

private _uri;
private _options;
private _subscribers;
private _items;

@@ -95,5 +97,7 @@ private _page;

uri: any;
}, items: any, count: any, options: PaginationOptions);
[Symbol.iterator](): IterableIterator<Item>;
}, items: any, count: any, options: PotionRequestOptions);
[Symbol.iterator](): IterableIterator<T>;
update(items: any, count: any): void;
subscribe(cb: (pagination: Pagination<T>) => void): void;
toArray(): T[];
}

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

else {
return new Pagination({ uri: uri, potion: _this }, data, count, { page: page, perPage: perPage });
return new Pagination({ uri: uri, potion: _this }, data, count, options);
}

@@ -306,8 +306,11 @@ }

var potion = _a.potion, uri = _a.uri;
this._subscribers = [];
this._items = [];
this._potion = potion;
this._uri = uri;
this._options = options;
(_b = this._items).push.apply(_b, items);
this._page = options.page;
this._perPage = options.perPage;
var _c = options.data, page = _c.page, perPage = _c.perPage;
this._page = page;
this._perPage = perPage;
this._total = count;

@@ -321,4 +324,12 @@ var _b;

set: function (page) {
this._potion.fetch({ page: page, perPage: this.perPage }, this);
var _this = this;
this._page = page;
Object.assign(this._options, {
data: Object.assign(this._options.data, { page: page })
});
this._potion.fetch(this._uri, this._options, this).then(function () {
_this._subscribers.forEach(function (subscriber) {
subscriber(_this);
});
});
},

@@ -357,2 +368,8 @@ enumerable: true,

};
Pagination.prototype.subscribe = function (cb) {
this._subscribers.push(cb);
};
Pagination.prototype.toArray = function () {
return this._items;
};
return Pagination;

@@ -359,0 +376,0 @@ }());

{
"name": "potion-client",
"version": "0.4.1",
"version": "0.4.2",
"description": "A ES6 client for APIs written in Flask-Potion",

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

Sorry, the diff of this file is not supported yet

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