Skip to content

Commit

Permalink
refactor: replace deprecated method (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub authored May 16, 2024
1 parent 69c5f30 commit 1e0f149
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,10 @@ function makeEnv (data, opts, prefix, env) {
i = i.replace(/^_+/, '')
let k
if (i.indexOf(namePref) === 0) {
k = i.substr(namePref.length).replace(/[^a-zA-Z0-9_]/g, '_')
k = i.substring(namePref.length).replace(/[^a-zA-Z0-9_]/g, '_')
pkgConfig[k] = value
} else if (i.indexOf(verPref) === 0) {
k = i.substr(verPref.length).replace(/[^a-zA-Z0-9_]/g, '_')
k = i.substring(verPref.length).replace(/[^a-zA-Z0-9_]/g, '_')
pkgVerConfig[k] = value
}
const envKey = (prefix + i).replace(/[^a-zA-Z0-9_]/g, '_')
Expand Down

0 comments on commit 1e0f149

Please sign in to comment.