mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 02:01:42 +03:00
6 lines
249 B
TypeScript
6 lines
249 B
TypeScript
|
export function isValidIPAddress(address: string) {
|
||
|
return /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(
|
||
|
address
|
||
|
);
|
||
|
}
|