Commit node_modules
This commit is contained in:
20
paige/node_modules/@popperjs/core/lib/utils/userAgent.js.flow
generated
vendored
Normal file
20
paige/node_modules/@popperjs/core/lib/utils/userAgent.js.flow
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// @flow
|
||||
type Navigator = Navigator & { userAgentData?: NavigatorUAData };
|
||||
|
||||
interface NavigatorUAData {
|
||||
brands: Array<{ brand: string, version: string }>;
|
||||
mobile: boolean;
|
||||
platform: string;
|
||||
}
|
||||
|
||||
export default function getUAString(): string {
|
||||
const uaData = (navigator: Navigator).userAgentData;
|
||||
|
||||
if (uaData?.brands) {
|
||||
return uaData.brands
|
||||
.map((item) => `${item.brand}/${item.version}`)
|
||||
.join(' ');
|
||||
}
|
||||
|
||||
return navigator.userAgent;
|
||||
}
|
||||
Reference in New Issue
Block a user