UNPKG

@bothub-chat/ui

Version:

Bothub UI Components

2 lines (1 loc) 172 B
const e=(e,t)=>{const s=t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),n=new RegExp(s,"i");return"string"==typeof e?n.test(e):e.some((e=>n.test(e)))};export{e as hasSubstring};