Skip to content

@tripo3d/trace / matchChannel

Function: matchChannel()

ts
function matchChannel(url, enabled?): ChannelDetector | undefined;

Defined in: trace/src/channels/index.ts:14

在当前 URL 上匹配渠道。

Parameters

ParameterTypeDescription
urlURL当前 URL
enabled?"baidu"[]启用的渠道白名单;未传则使用全部已注册渠道

Returns

ChannelDetector | undefined

命中的渠道检测器;无命中返回 undefined

基于 MIT 协议发布(内部使用)