UNPKG

steamcommunity-inventory

Version:

A rate limit and response handler for steamcommunity inventories. - It's functional. - Will appreciate all feedback I can get

17 lines (16 loc) 528 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isRateLimited = void 0; /** * Checks based on input if we would need to follow rate limit. * @param {Inventory} inventory instance * @param {boolean} */ function isRateLimited(inventory, steamID) { return isRateLimitedSteamID(inventory, steamID) || !inventory.cookies; } exports.isRateLimited = isRateLimited; ; function isRateLimitedSteamID(inventory, steamID) { return inventory.steamID !== steamID && steamID; }