mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 04:08:01 -05:00
* refactor Operational packages * fix: refactor operations package to use oclif * adjusting Dockerfile * adjusting github action * Update all-tools.yml Signed-off-by: Andrei A. <andrei.alexandru@consensys.net> * adjusting github action --------- Signed-off-by: Andrei A. <andrei.alexandru@consensys.net> Co-authored-by: VGau <victorien.gauch@consensys.net>
17 lines
378 B
TypeScript
17 lines
378 B
TypeScript
export const isValidNodeTarget = (sourceNode: string, targetNode: string): boolean => {
|
|
try {
|
|
if (sourceNode) {
|
|
new URL(sourceNode);
|
|
}
|
|
new URL(targetNode);
|
|
return true;
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
};
|
|
|
|
export const isLocalPort = (value: string): boolean => {
|
|
const port = Number(value);
|
|
return !isNaN(port) && port >= 1 && port <= 65535;
|
|
};
|