Skip to content

Commit 48d9202

Browse files
committed
Small refactoring
1 parent 8751bce commit 48d9202

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ function extractData(properties) {
334334
let index = 0;
335335
return files.map(content => {
336336
const variables = {};
337-
for (const pattern of patterns) {
337+
patterns.forEach(pattern => {
338338
XRegExp.forEach(content, pattern, (match, _) => {
339339
if (name != null && name.trim().length > 0) {
340340
const idx = index++;
@@ -362,7 +362,7 @@ function extractData(properties) {
362362
}
363363
}
364364
});
365-
}
365+
});
366366
return variables;
367367
}
368368
);
@@ -378,11 +378,11 @@ function exportVersion(prefix, version) {
378378
core.setOutput(prefix + "_VERSION_MINOR", version.minor);
379379
core.exportVariable(prefix + "_VERSION_PATCH", version.patch);
380380
core.setOutput(prefix + "_VERSION_PATCH", version.patch);
381-
if(version.prerelease) {
381+
if (version.prerelease) {
382382
core.exportVariable(prefix + "_VERSION_PRERELEASE", version.prerelease);
383383
core.setOutput(prefix + "_VERSION_PRERELEASE", version.prerelease);
384384
}
385-
if(version.buildmetadata) {
385+
if (version.buildmetadata) {
386386
core.exportVariable(prefix + "_VERSION_BUILDMETADATA", version.buildmetadata);
387387
core.setOutput(prefix + "_VERSION_BUILDMETADATA", version.buildmetadata);
388388
}
@@ -435,10 +435,10 @@ async function run() {
435435
const variables = Object.keys(data);
436436
variables.sort();
437437
core.info("Got extracted data variables: " + variables.join(", "));
438-
for (const key of variables) {
438+
variables.forEach(key => {
439439
core.exportVariable(key, data[key]);
440440
core.setOutput(key, data[key]);
441-
}
441+
});
442442
});
443443
}
444444

0 commit comments

Comments
 (0)