Skip to content

Commit

Permalink
Build
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Feb 14, 2024
1 parent 997ba69 commit 552b640
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.envsubst = void 0;
const REGEXP = new RegExp("\\$\\{?([A-Z_]+)\\}?");
const REGEXP = new RegExp("\\$([A-Z_]+)|\\$\\{([A-Z_]+)\\}");
function replacer(_match, p1, p2) {
return process.env[p2 ?? p1] ?? "";
}
function envsubst(str) {
return str.replace(REGEXP, replacer);
}
exports.envsubst = envsubst;
function replacer(_match, k) {
return process.env[k] ?? "";
}


/***/ }),
Expand Down

0 comments on commit 552b640

Please sign in to comment.