16 lines
364 B
TypeScript
16 lines
364 B
TypeScript
import { CardWideConfig } from '../types';
|
|
|
|
export const log = (cardWideConfig?: CardWideConfig, ...args: unknown[]) => {
|
|
if (cardWideConfig?.debug?.logging) {
|
|
console.debug(...args);
|
|
}
|
|
};
|
|
|
|
/**
|
|
* For debug purposes only.
|
|
* @param seconds
|
|
*/
|
|
export const sleep = async (seconds: number) => {
|
|
await new Promise((r) => setTimeout(r, seconds * 1000));
|
|
};
|