mirror of
https://github.com/iconify/iconify.git
synced 2025-01-08 07:48:29 +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 { installPackage } from '@antfu/install-pkg';
|
||||||
import { sleep } from '@antfu/utils';
|
import { sleep } from '@antfu/utils';
|
||||||
import { cyan, yellow } from 'kolorist';
|
import { cyan } from 'kolorist';
|
||||||
|
import { warnOnce } from './warn';
|
||||||
const warned = new Set<string>();
|
|
||||||
|
|
||||||
export function warnOnce(msg: string): void {
|
|
||||||
if (!warned.has(msg)) {
|
|
||||||
warned.add(msg);
|
|
||||||
console.warn(yellow(`[@iconify-loader] ${msg}`));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let pending: Promise<void> | undefined;
|
let pending: Promise<void> | undefined;
|
||||||
const tasks: Record<string, Promise<void> | undefined> = {};
|
const tasks: Record<string, Promise<void> | undefined> = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user