修改后台权限
This commit is contained in:
19
node_modules/@mswjs/interceptors/src/utils/getValueBySymbol.ts
generated
vendored
Normal file
19
node_modules/@mswjs/interceptors/src/utils/getValueBySymbol.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Returns the value behind the symbol with the given name.
|
||||
*/
|
||||
export function getValueBySymbol<T>(
|
||||
symbolName: string,
|
||||
source: object
|
||||
): T | undefined {
|
||||
const ownSymbols = Object.getOwnPropertySymbols(source)
|
||||
|
||||
const symbol = ownSymbols.find((symbol) => {
|
||||
return symbol.description === symbolName
|
||||
})
|
||||
|
||||
if (symbol) {
|
||||
return Reflect.get(source, symbol)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user