@shopify/admin-api-client
Version:
Shopify Admin API Client - A lightweight JS client to interact with Shopify's Admin API
16 lines (13 loc) • 508 B
JavaScript
import { CLIENT } from './constants.mjs';
function validateRequiredAccessToken(accessToken) {
if (!accessToken) {
throw new Error(`${CLIENT}: an access token must be provided`);
}
}
function validateServerSideUsage(isTesting = false) {
if (typeof window !== 'undefined' && !isTesting) {
throw new Error(`${CLIENT}: this client should not be used in the browser`);
}
}
export { validateRequiredAccessToken, validateServerSideUsage };
//# sourceMappingURL=validations.mjs.map