2
0
mirror of https://github.com/iconify/iconify.git synced 2025-01-07 07:34:22 +00:00

Remove duplicate warnOnce in utils

This commit is contained in:
Vjacheslav Trushkin 2022-03-15 21:07:35 +02:00
parent fbd61e9183
commit 7ba7852d12

View File

@ -1,15 +1,7 @@
import { installPackage } from '@antfu/install-pkg';
import { sleep } from '@antfu/utils';
import { cyan, yellow } from 'kolorist';
const warned = new Set<string>();
export function warnOnce(msg: string): void {
if (!warned.has(msg)) {
warned.add(msg);
console.warn(yellow(`[@iconify-loader] ${msg}`));
}
}
import { cyan } from 'kolorist';
import { warnOnce } from './warn';
let pending: Promise<void> | undefined;
const tasks: Record<string, Promise<void> | undefined> = {};