MCPcopy
hub / github.com/APIParkLab/APIPark / shouldNotTransform

Function shouldNotTransform

frontend/packages/common/src/hooks/http.ts:6–8  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

4const urlWhiteList = [/api.example.com\/users/, /api.example2.com\/products/] // 正则白名单
5
6function shouldNotTransform(url: string) {
7 return urlWhiteList.some((regex) => regex.test(url))
8}
9
10function toCamel(s: string) {
11 return s.replace(/(_\w)/g, (k) => k[1].toUpperCase())

Callers 1

fetchDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected