1'use strict'; 2 3// This file contains process bootstrappers that can only be 4// run in the worker thread. 5 6const { 7 codes: { ERR_WORKER_UNSUPPORTED_OPERATION } 8} = require('internal/errors'); 9 10function unavailable(name) { 11 function unavailableInWorker() { 12 throw new ERR_WORKER_UNSUPPORTED_OPERATION(name); 13 } 14 15 unavailableInWorker.disabled = true; 16 return unavailableInWorker; 17} 18 19module.exports = { 20 unavailable 21}; 22