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 1.5.0 to 1.5.1

2

core.d.ts

@@ -6,2 +6,2 @@ export { ItemOptions, Item } from './core/item';

export { Route, route } from './core/route';
export { isAPotionItem, isDate, isFunction, isJsObject, isObjectEmpty, KeyMapper, omap, mapToObject, merge, toCamelCase, toPotionJSON, toSnakeCase, ValueMapper } from './core/utils';
export { getPotionURI, hasTypeAndId, isAPotionItem, isDate, isFunction, isJsObject, isObjectEmpty, KeyMapper, omap, mapToObject, merge, parsePotionID, toCamelCase, toPotionJSON, toSnakeCase, ValueMapper } from './core/utils';

@@ -15,2 +15,4 @@ "use strict";

var utils_1 = require("./core/utils");
exports.getPotionURI = utils_1.getPotionURI;
exports.hasTypeAndId = utils_1.hasTypeAndId;
exports.isAPotionItem = utils_1.isAPotionItem;

@@ -24,5 +26,6 @@ exports.isDate = utils_1.isDate;

exports.merge = utils_1.merge;
exports.parsePotionID = utils_1.parsePotionID;
exports.toCamelCase = utils_1.toCamelCase;
exports.toPotionJSON = utils_1.toPotionJSON;
exports.toSnakeCase = utils_1.toSnakeCase;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsb0NBQThDO0FBQXpCLHNCQUFBLElBQUksQ0FBQTtBQUN6Qiw0Q0FBeUM7QUFBakMsOEJBQUEsUUFBUSxDQUFBO0FBQ2hCLGdEQUFnRTtBQUFyQyxrQ0FBQSxVQUFVLENBQUE7QUFDckMsd0NBU3VCO0FBRHRCLDhCQUFBLFVBQVUsQ0FBQTtBQUVYLHNDQUEwQztBQUFsQyx3QkFBQSxLQUFLLEN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0IHtJdGVtT3B0aW9ucywgSXRlbX0gZnJvbSAnLi9jb3JlL2l0ZW0nO1xuZXhwb3J0IHtyZWFkb25seX0gZnJvbSAnLi9jb3JlL21ldGFkYXRhJztcbmV4cG9ydCB7UGFnaW5hdGlvbk9wdGlvbnMsIFBhZ2luYXRpb259IGZyb20gJy4vY29yZS9wYWdpbmF0aW9uJztcbmV4cG9ydCB7XG5cdEl0ZW1DYWNoZSxcblx0VVJMU2VhcmNoUGFyYW1zLFxuXHRSZXF1ZXN0T3B0aW9ucyxcblx0RmV0Y2hPcHRpb25zLFxuXHRRdWVyeU9wdGlvbnMsXG5cdFBvdGlvbk9wdGlvbnMsXG5cdFBvdGlvblJlc3BvbnNlLFxuXHRQb3Rpb25CYXNlXG59IGZyb20gJy4vY29yZS9wb3Rpb24nO1xuZXhwb3J0IHtSb3V0ZSwgcm91dGV9IGZyb20gJy4vY29yZS9yb3V0ZSc7XG5leHBvcnQge1xuXHRnZXRQb3Rpb25VUkksXG5cdGhhc1R5cGVBbmRJZCxcblx0aXNBUG90aW9uSXRlbSxcblx0aXNEYXRlLFxuXHRpc0Z1bmN0aW9uLFxuXHRpc0pzT2JqZWN0LFxuXHRpc09iamVjdEVtcHR5LFxuXHRLZXlNYXBwZXIsXG5cdG9tYXAsXG5cdG1hcFRvT2JqZWN0LFxuXHRtZXJnZSxcblx0cGFyc2VQb3Rpb25JRCxcblx0dG9DYW1lbENhc2UsXG5cdHRvUG90aW9uSlNPTixcblx0dG9TbmFrZUNhc2UsXG5cdFZhbHVlTWFwcGVyXG59IGZyb20gJy4vY29yZS91dGlscyc7XG4iXX0=

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

[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./core/item","export":["ItemOptions","Item"]},{"from":"./core/metadata","export":["readonly"]},{"from":"./core/pagination","export":["PaginationOptions","Pagination"]},{"from":"./core/potion","export":["ItemCache","URLSearchParams","RequestOptions","FetchOptions","QueryOptions","PotionOptions","PotionResponse","PotionBase"]},{"from":"./core/route","export":["Route","route"]},{"from":"./core/utils","export":["isAPotionItem","isDate","isFunction","isJsObject","isObjectEmpty","KeyMapper","omap","mapToObject","merge","toCamelCase","toPotionJSON","toSnakeCase","ValueMapper"]}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./core/item","export":["ItemOptions","Item"]},{"from":"./core/metadata","export":["readonly"]},{"from":"./core/pagination","export":["PaginationOptions","Pagination"]},{"from":"./core/potion","export":["ItemCache","URLSearchParams","RequestOptions","FetchOptions","QueryOptions","PotionOptions","PotionResponse","PotionBase"]},{"from":"./core/route","export":["Route","route"]},{"from":"./core/utils","export":["isAPotionItem","isDate","isFunction","isJsObject","isObjectEmpty","KeyMapper","omap","mapToObject","merge","toCamelCase","toPotionJSON","toSnakeCase","ValueMapper"]}]}]
[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./core/item","export":["ItemOptions","Item"]},{"from":"./core/metadata","export":["readonly"]},{"from":"./core/pagination","export":["PaginationOptions","Pagination"]},{"from":"./core/potion","export":["ItemCache","URLSearchParams","RequestOptions","FetchOptions","QueryOptions","PotionOptions","PotionResponse","PotionBase"]},{"from":"./core/route","export":["Route","route"]},{"from":"./core/utils","export":["getPotionURI","hasTypeAndId","isAPotionItem","isDate","isFunction","isJsObject","isObjectEmpty","KeyMapper","omap","mapToObject","merge","parsePotionID","toCamelCase","toPotionJSON","toSnakeCase","ValueMapper"]}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./core/item","export":["ItemOptions","Item"]},{"from":"./core/metadata","export":["readonly"]},{"from":"./core/pagination","export":["PaginationOptions","Pagination"]},{"from":"./core/potion","export":["ItemCache","URLSearchParams","RequestOptions","FetchOptions","QueryOptions","PotionOptions","PotionResponse","PotionBase"]},{"from":"./core/route","export":["Route","route"]},{"from":"./core/utils","export":["getPotionURI","hasTypeAndId","isAPotionItem","isDate","isFunction","isJsObject","isObjectEmpty","KeyMapper","omap","mapToObject","merge","parsePotionID","toCamelCase","toPotionJSON","toSnakeCase","ValueMapper"]}]}]

@@ -46,11 +46,2 @@ import { Item, ItemOptions } from './item';

}
export declare function getErrorMessage(error: any, uri: string): string;
export declare function canAggregateURI({$type, $id}: {
[key: string]: any;
}): boolean;
export declare function getURI({$uri, $ref, $type, $id}: {
[key: string]: any;
}): string;
export declare function removePrefix(uri: string, prefix: string): string;
export declare function parseID(id: any): string | number | null;
/**

@@ -57,0 +48,0 @@ * This class contains the main logic for interacting with the Flask Potion backend.

@@ -15,48 +15,2 @@ "use strict";

var utils_1 = require("./utils");
function getErrorMessage(error, uri) {
if (error instanceof Error) {
return error.message;
}
else if (typeof error === 'string') {
return error;
}
return "An error occurred while Potion tried to retrieve a resource from '" + uri + "'.";
}
exports.getErrorMessage = getErrorMessage;
function canAggregateURI(_a) {
var $type = _a.$type, $id = _a.$id;
return (typeof $id === 'string' || Number.isInteger($id)) && typeof $type === 'string';
}
exports.canAggregateURI = canAggregateURI;
function getURI(_a) {
var $uri = _a.$uri, $ref = _a.$ref, $type = _a.$type, $id = _a.$id;
if (typeof $uri === 'string') {
return decodeURIComponent($uri);
}
else if (typeof $ref === 'string') {
return decodeURIComponent($ref);
}
else if (canAggregateURI({ $type: $type, $id: $id })) {
return "/" + $type + "/" + $id;
}
return '';
}
exports.getURI = getURI;
function removePrefix(uri, prefix) {
if (uri.indexOf(prefix) === 0) {
return uri.substring(prefix.length);
}
return uri;
}
exports.removePrefix = removePrefix;
function parseID(id) {
if (typeof id === 'string') {
return /^\d+$/.test(id) ? parseInt(id, 10) : id;
}
else if (Number.isInteger(id)) {
return id;
}
return null;
}
exports.parseID = parseID;
/**

@@ -92,6 +46,3 @@ * This class contains the main logic for interacting with the Flask Potion backend.

// Add the API prefix if not present
var prefix = this.prefix;
if (uri.indexOf(prefix) === -1) {
uri = "" + prefix + uri;
}
uri = utils_1.addPrefixToURI(uri, this.prefix);
// Serialize request to Potion JSON.

@@ -118,3 +69,3 @@ var fetch = function () { return _this.request("" + _this.host + uri, _this.serialize(options))

_this.pendingGETRequests.delete(uri);
var message = getErrorMessage(err, uri);
var message = utils_1.getErrorMessage(err, uri);
return Promise.reject(message);

@@ -194,3 +145,3 @@ }));

}
else if (typeof json.$uri === 'string' || canAggregateURI(json)) {
else if (typeof json.$uri === 'string' || utils_1.hasTypeAndId(json)) {
// NOTE: The json may also have {$type, $id} that can be used to recognize a resource instead of {$uri}.

@@ -260,3 +211,3 @@ // If neither combination is provided it will throw.

var Promise = this.Promise;
var uri = removePrefix(getURI({ $ref: $ref, $uri: $uri, $type: $type, $id: $id }), this.prefix);
var uri = utils_1.removePrefixFromURI(utils_1.getPotionURI({ $ref: $ref, $uri: $uri, $type: $type, $id: $id }), this.prefix);
var entry = utils_1.entries(this.resources)

@@ -273,3 +224,3 @@ .find(function (_a) {

var params = { resource: resource, uri: uri };
var id = parseID($id);
var id = utils_1.parsePotionID($id);
if (id !== null) {

@@ -282,3 +233,3 @@ Object.assign(params, { id: id });

Object.assign(params, {
id: parseID(part)
id: utils_1.parsePotionID(part)
});

@@ -310,2 +261,2 @@ }

exports.PotionBase = PotionBase;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL3BvdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsd0NBQXdDO0FBQ3hDLHVDQUtvQjtBQUVwQiwyQ0FBMkQ7QUFDM0QsaUNBT2lCO0FBMkRqQix5QkFBZ0MsS0FBVSxFQUFFLEdBQVc7SUFDdEQsRUFBRSxDQUFDLENBQUMsS0FBSyxZQUFZLEtBQUssQ0FBQyxDQUFDLENBQUM7UUFDNUIsTUFBTSxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUM7SUFDdEIsQ0FBQztJQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxPQUFPLEtBQUssS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDO1FBQ3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odmFsdWUgPT4ge1xuXHRcdFx0XHRwcm9wZXJ0aWVzLnNldCh0b0NhbWVsQ2FzZShrZXkpLCB2YWx1ZSk7XG5cdFx0XHRcdHJldHVybiB2YWx1ZTtcblx0XHRcdH0pKTtcblx0XHR9XG5cblx0XHRyZXR1cm4gUHJvbWlzZS5hbGwocHJvbWlzZXMpXG5cdFx0XHQudGhlbigoKSA9PiBtYXBUb09iamVjdChwcm9wZXJ0aWVzKSk7XG5cdH1cbn1cbiJdfQ==

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

[{"__symbolic":"module","version":3,"metadata":{"ItemCache":{"__symbolic":"interface"},"ParsedURI":{"__symbolic":"interface"},"URLSearchParams":{"__symbolic":"interface"},"RequestOptions":{"__symbolic":"interface"},"FetchOptions":{"__symbolic":"interface"},"QueryOptions":{"__symbolic":"interface"},"PotionResponse":{"__symbolic":"interface"},"PotionOptions":{"__symbolic":"interface"},"getErrorMessage":{"__symbolic":"function"},"canAggregateURI":{"__symbolic":"function","parameters":["$type","$id"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":86,"character":9},"right":"string"},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Number"},"member":"isInteger"},"arguments":[{"__symbolic":"reference","name":"$id"}]}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":86,"character":62},"right":"string"}}},"getURI":{"__symbolic":"function"},"removePrefix":{"__symbolic":"function"},"parseID":{"__symbolic":"function"},"PotionBase":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}],"fetch":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"registerAs":[{"__symbolic":"method"}],"request":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}],"deserialize":[{"__symbolic":"method"}],"fromPotionJSON":[{"__symbolic":"method"}],"parseURI":[{"__symbolic":"method"}],"parsePotionJSONProperties":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"ItemCache":{"__symbolic":"interface"},"ParsedURI":{"__symbolic":"interface"},"URLSearchParams":{"__symbolic":"interface"},"RequestOptions":{"__symbolic":"interface"},"FetchOptions":{"__symbolic":"interface"},"QueryOptions":{"__symbolic":"interface"},"PotionResponse":{"__symbolic":"interface"},"PotionOptions":{"__symbolic":"interface"},"getErrorMessage":{"__symbolic":"function"},"canAggregateURI":{"__symbolic":"function","parameters":["$type","$id"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":86,"character":9},"right":"string"},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Number"},"member":"isInteger"},"arguments":[{"__symbolic":"reference","name":"$id"}]}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":86,"character":62},"right":"string"}}},"getURI":{"__symbolic":"function"},"removePrefix":{"__symbolic":"function"},"parseID":{"__symbolic":"function"},"PotionBase":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}],"fetch":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"registerAs":[{"__symbolic":"method"}],"request":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}],"deserialize":[{"__symbolic":"method"}],"fromPotionJSON":[{"__symbolic":"method"}],"parseURI":[{"__symbolic":"method"}],"parsePotionJSONProperties":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":3,"metadata":{"ItemCache":{"__symbolic":"interface"},"ParsedURI":{"__symbolic":"interface"},"URLSearchParams":{"__symbolic":"interface"},"RequestOptions":{"__symbolic":"interface"},"FetchOptions":{"__symbolic":"interface"},"QueryOptions":{"__symbolic":"interface"},"PotionResponse":{"__symbolic":"interface"},"PotionOptions":{"__symbolic":"interface"},"PotionBase":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}],"fetch":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"registerAs":[{"__symbolic":"method"}],"request":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}],"deserialize":[{"__symbolic":"method"}],"fromPotionJSON":[{"__symbolic":"method"}],"parseURI":[{"__symbolic":"method"}],"parsePotionJSONProperties":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"ItemCache":{"__symbolic":"interface"},"ParsedURI":{"__symbolic":"interface"},"URLSearchParams":{"__symbolic":"interface"},"RequestOptions":{"__symbolic":"interface"},"FetchOptions":{"__symbolic":"interface"},"QueryOptions":{"__symbolic":"interface"},"PotionResponse":{"__symbolic":"interface"},"PotionOptions":{"__symbolic":"interface"},"PotionBase":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}],"fetch":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"registerAs":[{"__symbolic":"method"}],"request":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}],"deserialize":[{"__symbolic":"method"}],"fromPotionJSON":[{"__symbolic":"method"}],"parseURI":[{"__symbolic":"method"}],"parsePotionJSONProperties":[{"__symbolic":"method"}]}}}}]

@@ -36,2 +36,6 @@ import { Item } from './item';

/**
* Aggregate a str based on an Error object and uri
*/
export declare function getErrorMessage(error: any, uri?: string): string;
/**
* Convert an Object to Potion JSON

@@ -43,2 +47,23 @@ */

/**
* Parse a Potion ID
*/
export declare function parsePotionID(id: any): string | number | null;
/**
* Get the Potion URI from a Potion JSON object
*/
export declare function hasTypeAndId({$type, $id}: {
[key: string]: any;
}): boolean;
export declare function getPotionURI({$uri, $ref, $type, $id}: {
[key: string]: any;
}): string;
/**
* Remove some string from another string
*/
export declare function removePrefixFromURI(uri: string, str: string): string;
/**
* Add a prefix to some string (if not already there)
*/
export declare function addPrefixToURI(uri: string, prefix?: string): string;
/**
* Merge array of objects into one object.

@@ -45,0 +70,0 @@ */

@@ -87,2 +87,19 @@ "use strict";

/**
* Aggregate a str based on an Error object and uri
*/
function getErrorMessage(error, uri) {
var message = 'An error occurred while Potion tried to retrieve a resource';
if (error instanceof Error) {
return error.message;
}
else if (typeof error === 'string') {
return error;
}
else if (typeof uri === 'string') {
return message + " from '" + uri + "'.";
}
return message + ".";
}
exports.getErrorMessage = getErrorMessage;
/**
* Convert an Object to Potion JSON

@@ -93,3 +110,3 @@ */

if (json instanceof item_1.Item && typeof json.uri === 'string') {
return { $ref: "" + (typeof prefix === 'string' ? prefix : '') + json.uri };
return { $ref: "" + addPrefixToURI(json.uri, prefix) };
}

@@ -108,2 +125,57 @@ else if (json instanceof Date) {

/**
* Parse a Potion ID
*/
function parsePotionID(id) {
if (typeof id === 'string') {
return /^\d+$/.test(id) ? parseInt(id, 10) : id;
}
else if (Number.isInteger(id)) {
return id;
}
return null;
}
exports.parsePotionID = parsePotionID;
/**
* Get the Potion URI from a Potion JSON object
*/
function hasTypeAndId(_a) {
var $type = _a.$type, $id = _a.$id;
return (typeof $id === 'string' || Number.isInteger($id)) && typeof $type === 'string';
}
exports.hasTypeAndId = hasTypeAndId;
function getPotionURI(_a) {
var $uri = _a.$uri, $ref = _a.$ref, $type = _a.$type, $id = _a.$id;
if (typeof $uri === 'string') {
return decodeURIComponent($uri);
}
else if (typeof $ref === 'string') {
return decodeURIComponent($ref);
}
else if (hasTypeAndId({ $type: $type, $id: $id })) {
return "/" + $type + "/" + $id;
}
return '';
}
exports.getPotionURI = getPotionURI;
/**
* Remove some string from another string
*/
function removePrefixFromURI(uri, str) {
if (uri.includes(str)) {
return uri.substring(str.length);
}
return uri;
}
exports.removePrefixFromURI = removePrefixFromURI;
/**
* Add a prefix to some string (if not already there)
*/
function addPrefixToURI(uri, prefix) {
if (typeof prefix === 'string' && !uri.includes(prefix)) {
return "" + prefix + uri;
}
return uri;
}
exports.addPrefixToURI = addPrefixToURI;
/**
* Merge array of objects into one object.

@@ -169,2 +241,2 @@ */

exports.MemCache = MemCache;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsK0JBQTRCO0FBSTVCOztHQUVHO0FBQ0gscUJBQTRCLEdBQVcsRUFBRSxTQUF1QjtJQUF2QiwwQkFBQSxFQUFBLGVBQXVCO0lBQy9ELE1BQU0sQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDLGlCQUFpQixFQUFFLFVBQUMsQ0FBQyxFQUFFLEVBQUUsSUFBSyxPQUFBLEtBQUcsU0FBUyxHQUFHLEVBQUUsQ0FBQyxXQUFXLEVBQUksRUFBakMsQ0FBaUMsQ0FBQztTQUNqRixPQUFPLENBQUMsSUFBSSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0FBQ3JCLENBQUM7QUFIRCxrQ0FHQztBQUdEOztHQUVHO0FBQ0gscUJBQTRCLEdBQVc7SUFDdEMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsY0FBYyxFQUFFLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLFdBQVcsRUFBRSxFQUFsQixDQUFrQixDQUFDLENBQUM7QUFDN0QsQ0FBQztBQUZELGtDQUVDO0FBR0Q7O0dBRUc7QUFDSCxxQkFBNEIsR0FBa0I7SUFDN0MsSUFBTSxHQUFHLEdBQUcsRUFBRSxDQUFDO0lBQ2YsR0FBRyxDQUFDLENBQXVCLFVBQXlCLEVBQXpCLEtBQUEsT0FBTyxDQUFjLEdBQUcsQ0FBQyxFQUF6QixjQUF5QixFQUF6QixJQUF5QjtRQUF6QyxJQUFBLFdBQVksRUFBWCxXQUFHLEVBQUUsYU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0ZW0pXG5cdFx0XHQuZ2V0KGtleSk7XG5cdH1cblxuXHRyZW1vdmUoa2V5OiBzdHJpbmcpOiB2b2lkIHtcblx0XHR0aGlzLml0ZW1zLmRlbGV0ZShrZXkpO1xuXHR9XG59XG4iXX0=

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

[{"__symbolic":"module","version":3,"metadata":{"toSnakeCase":{"__symbolic":"function","parameters":["str","separator"],"value":{"__symbolic":"error","message":"Expression form not supported","line":9,"character":11},"defaults":[null,"_"]},"toCamelCase":{"__symbolic":"function","parameters":["str"],"value":{"__symbolic":"error","message":"Expression form not supported","line":17,"character":20}},"mapToObject":{"__symbolic":"function"},"isJsObject":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":39,"character":8},"right":"object"},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"value"}]}}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"value"},"right":null}}},"isDate":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"value"},"right":{"__symbolic":"reference","name":"Date"}}},"isFunction":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":46,"character":8},"right":"function"}},"isAPotionItem":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"value"},"right":{"__symbolic":"reference","module":"./item","name":"Item"}}},"omap":{"__symbolic":"function"},"toPotionJSON":{"__symbolic":"function"},"merge":{"__symbolic":"function"},"isObjectEmpty":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"keys"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"member":"length"},"right":0}},"entries":{"__symbolic":"function"},"MemCache":{"__symbolic":"class","arity":1,"members":{"has":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"put":[{"__symbolic":"method"}],"remove":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"toSnakeCase":{"__symbolic":"function","parameters":["str","separator"],"value":{"__symbolic":"error","message":"Expression form not supported","line":9,"character":11},"defaults":[null,"_"]},"toCamelCase":{"__symbolic":"function","parameters":["str"],"value":{"__symbolic":"error","message":"Expression form not supported","line":17,"character":20}},"mapToObject":{"__symbolic":"function"},"isJsObject":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":39,"character":8},"right":"object"},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"value"}]}}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"value"},"right":null}}},"isDate":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"value"},"right":{"__symbolic":"reference","name":"Date"}}},"isFunction":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":46,"character":8},"right":"function"}},"isAPotionItem":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"value"},"right":{"__symbolic":"reference","module":"./item","name":"Item"}}},"omap":{"__symbolic":"function"},"toPotionJSON":{"__symbolic":"function"},"merge":{"__symbolic":"function"},"isObjectEmpty":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"keys"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"member":"length"},"right":0}},"entries":{"__symbolic":"function"},"MemCache":{"__symbolic":"class","arity":1,"members":{"has":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"put":[{"__symbolic":"method"}],"remove":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":3,"metadata":{"toSnakeCase":{"__symbolic":"function","parameters":["str","separator"],"value":{"__symbolic":"error","message":"Expression form not supported","line":9,"character":11},"defaults":[null,"_"]},"toCamelCase":{"__symbolic":"function","parameters":["str"],"value":{"__symbolic":"error","message":"Expression form not supported","line":17,"character":20}},"mapToObject":{"__symbolic":"function"},"isJsObject":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":39,"character":8},"right":"object"},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"value"}]}}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"value"},"right":null}}},"isDate":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"value"},"right":{"__symbolic":"reference","name":"Date"}}},"isFunction":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":46,"character":8},"right":"function"}},"isAPotionItem":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"value"},"right":{"__symbolic":"reference","module":"./item","name":"Item"}}},"omap":{"__symbolic":"function"},"getErrorMessage":{"__symbolic":"function"},"toPotionJSON":{"__symbolic":"function"},"parsePotionID":{"__symbolic":"function"},"hasTypeAndId":{"__symbolic":"function","parameters":["$type","$id"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":138,"character":9},"right":"string"},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Number"},"member":"isInteger"},"arguments":[{"__symbolic":"reference","name":"$id"}]}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":138,"character":62},"right":"string"}}},"getPotionURI":{"__symbolic":"function"},"removePrefixFromURI":{"__symbolic":"function"},"addPrefixToURI":{"__symbolic":"function"},"merge":{"__symbolic":"function"},"isObjectEmpty":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"keys"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"member":"length"},"right":0}},"entries":{"__symbolic":"function"},"MemCache":{"__symbolic":"class","arity":1,"members":{"has":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"put":[{"__symbolic":"method"}],"remove":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"toSnakeCase":{"__symbolic":"function","parameters":["str","separator"],"value":{"__symbolic":"error","message":"Expression form not supported","line":9,"character":11},"defaults":[null,"_"]},"toCamelCase":{"__symbolic":"function","parameters":["str"],"value":{"__symbolic":"error","message":"Expression form not supported","line":17,"character":20}},"mapToObject":{"__symbolic":"function"},"isJsObject":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":39,"character":8},"right":"object"},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"value"}]}}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"value"},"right":null}}},"isDate":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"value"},"right":{"__symbolic":"reference","name":"Date"}}},"isFunction":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":46,"character":8},"right":"function"}},"isAPotionItem":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"value"},"right":{"__symbolic":"reference","module":"./item","name":"Item"}}},"omap":{"__symbolic":"function"},"getErrorMessage":{"__symbolic":"function"},"toPotionJSON":{"__symbolic":"function"},"parsePotionID":{"__symbolic":"function"},"hasTypeAndId":{"__symbolic":"function","parameters":["$type","$id"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":138,"character":9},"right":"string"},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Number"},"member":"isInteger"},"arguments":[{"__symbolic":"reference","name":"$id"}]}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":138,"character":62},"right":"string"}}},"getPotionURI":{"__symbolic":"function"},"removePrefixFromURI":{"__symbolic":"function"},"addPrefixToURI":{"__symbolic":"function"},"merge":{"__symbolic":"function"},"isObjectEmpty":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"keys"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"member":"length"},"right":0}},"entries":{"__symbolic":"function"},"MemCache":{"__symbolic":"class","arity":1,"members":{"has":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"put":[{"__symbolic":"method"}],"remove":[{"__symbolic":"method"}]}}}}]
{
"name": "potion-client",
"version": "1.5.0",
"version": "1.5.1",
"description": "A ES6 client for APIs written in Flask-Potion",

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

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