import globLib, { IOptions } from "glob";
export async function delay(timeout: number) {
return new Promise((resolve) => {
setTimeout(() => {
resolve('');
}, timeout);
});
}
export function getAssetsDir() {
return `${__dirname}/../assets`;
export async function glob(pattern: string, options?: IOptions) {
return new Promise((resolve, reject) => {
if (options) {
globLib(pattern, options, (err, ret) => {
if (err) {
reject(err);
} else {
resolve(ret);
globLib(pattern, (err, ret) => {
}) as Promise<string[]>;