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:
parent
fbd61e9183
commit
7ba7852d12
@ -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> = {};
|
||||
|
Loading…
Reference in New Issue
Block a user