UNPKG

@lifi/widget

Version:

LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.

9 lines (7 loc) 240 B
import type { AllowDeny } from '../types/widget.js' export const isItemAllowed = <T>(itemId: T, items?: AllowDeny<T>) => { if (items?.allow?.length) { return items.allow.includes(itemId) } return !items?.deny?.includes(itemId) }