Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NodeSharedCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
Shared
NodeSharedCode
Compare revisions
bfca2c401e4b5ff69b0a515fd9dcab49d36ee212 to a026c4af16be3ae962b3031546ffac328e19fe50
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
dojo_project/projects/shared/nodesharedcode
Select target project
No results found
a026c4af16be3ae962b3031546ffac328e19fe50
Select Git revision
Branches
jw_sonar
jw_sonar_backup
main
move-to-esm-only
open_tool_for_self_hosting
v5.0
Tags
v4.1
v4.2
8 results
Swap
Target
dojo_project/projects/shared/nodesharedcode
Select target project
dojo_project/projects/shared/nodesharedcode
1 result
bfca2c401e4b5ff69b0a515fd9dcab49d36ee212
Select Git revision
Branches
jw_sonar
jw_sonar_backup
main
move-to-esm-only
open_tool_for_self_hosting
v5.0
Tags
v4.1
v4.2
8 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
TypeScriptExtensions => Add function to replace env vars in str
· a026c4af
michael.minelli
authored
2 years ago
a026c4af
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
helpers/TypeScriptExtensions.ts
+10
-0
10 additions, 0 deletions
helpers/TypeScriptExtensions.ts
with
10 additions
and
0 deletions
helpers/TypeScriptExtensions.ts
View file @
a026c4af
...
...
@@ -8,6 +8,7 @@ declare global {
toBoolean
:
()
=>
boolean
;
capitalizingFirstLetter
:
()
=>
string
;
capitalizeName
:
()
=>
string
;
convertWithEnvVars
:
()
=>
string
;
}
}
...
...
@@ -17,6 +18,7 @@ function registerAll() {
registerStringToBoolean
();
registerStringCapitalizingFirstLetter
();
registerStringCapitalizeName
();
registerStringConvertWithEnvVars
();
}
function
registerBigIntJson
()
{
...
...
@@ -55,6 +57,14 @@ function registerStringCapitalizeName() {
};
}
function
registerStringConvertWithEnvVars
()
{
String
.
prototype
.
convertWithEnvVars
=
function
(
this
:
string
):
string
{
return
this
.
replace
(
/
\$
{
?([
a-zA-Z0-9_
]
+
)
}
?
/g
,
(
match
:
string
,
p1
:
string
)
=>
{
return
process
.
env
[
p1
]
||
''
;
});
};
}
registerAll
();
...
...
This diff is collapsed.
Click to expand it.