UNPKG

nginx-binaries

Version:

A downloader for nginx and njs standalone binaries.

21 lines 694 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.replaceProperty = exports.bindAll = void 0; function bindAll(obj) { for (const propName of Object.getOwnPropertyNames(obj)) { const desc = Object.getOwnPropertyDescriptor(obj, propName); if (typeof desc.value === 'function') { desc.value = desc.value.bind(obj); Object.defineProperty(obj, propName, desc); } } return obj; } exports.bindAll = bindAll; function replaceProperty(obj, propName, value) { delete obj[propName]; obj[propName] = value; return value; } exports.replaceProperty = replaceProperty; //# sourceMappingURL=utils.js.map