UNPKG

coingecko-tokens

Version:

Aggregated list of Token Lists from CoinGecko

21 lines (16 loc) 486 B
import _Ajv from 'ajv'; import addFormats from 'ajv-formats'; // Singleton Ajv instance export type AjvType = typeof _Ajv & { addFormats: typeof addFormats }; export const Ajv: AjvType = (globalThis as { Ajv?: AjvType })?.Ajv || (() => { const __Ajv = _Ajv; (__Ajv as unknown as AjvType).addFormats = addFormats; return __Ajv as AjvType; })(); export const ajv = new Ajv({ allErrors: true, allowUnionTypes: true, }); Ajv.addFormats(ajv);