(name: string)
| 863 | * @since 4.0.0 |
| 864 | */ |
| 865 | export const parseFdName = (name: string): number | undefined => { |
| 866 | const match = /^fd(\d+)$/.exec(name) |
| 867 | if (match === null) return undefined |
| 868 | const fd = parseInt(match[1], 10) |
| 869 | return fd >= 3 ? fd : undefined |
| 870 | } |
| 871 | |
| 872 | /** |
| 873 | * Create an fd name from its numeric index. |