fetch-node-website
Version:
Fetch releases on nodejs.org
17 lines (10 loc) • 299 B
JavaScript
import{env}from"node:process";
export const getDefaultMirror=()=>
MIRRORS.map(getEnv).find(Boolean)??DEFAULT_MIRROR;
const MIRRORS=[
"NODE_MIRROR",
"NVM_NODEJS_ORG_MIRROR",
"N_NODE_MIRROR",
"NODIST_NODE_MIRROR"];
const getEnv=(name)=>env[name];
const DEFAULT_MIRROR="https://nodejs.org/dist";