Skip to content

Commit

Permalink
refactor: replace deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub committed May 15, 2024
1 parent bfd262b commit 2807a27
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 2807a27

Please sign in to comment.