Skip to content

Commit

Permalink
Merge branch 'develop' into feature/dat-1207-javascript-transformatio…
Browse files Browse the repository at this point in the history
…n-changes
  • Loading branch information
kanishkkatara authored Jun 19, 2024
2 parents 2a17453 + c68dca2 commit d655fd1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
"@ndhoule/extend": "^2.0.0",
"@pyroscope/nodejs": "^0.2.9",
"@rudderstack/integrations-lib": "^0.2.10",
"@rudderstack/json-template-engine": "^0.13.8",
"@rudderstack/workflow-engine": "^0.8.6",
"@rudderstack/json-template-engine": "^0.14.1",
"@rudderstack/workflow-engine": "^0.8.8",
"@shopify/jest-koa-mocks": "^5.1.1",
"ajv": "^8.12.0",
"ajv-draft-04": "^1.0.0",
Expand Down
11 changes: 2 additions & 9 deletions src/v0/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2248,15 +2248,8 @@ const validateEventAndLowerCaseConversion = (event, isMandatory, convertToLowerC
return convertToLowerCase ? event.toString().toLowerCase() : event.toString();
};

const applyCustomMappings = (message, mappings) => {
const flatMappings = mappings.map((mapping) => ({
input: mapping.from,
output: mapping.to,
}));
return JsonTemplateEngine.createAsSync(flatMappings, { defaultPathType: PathType.JSON }).evaluate(
message,
);
};
const applyCustomMappings = (message, mappings) =>
JsonTemplateEngine.createAsSync(mappings, { defaultPathType: PathType.JSON }).evaluate(message);

// ========================================================================
// EXPORTS
Expand Down

0 comments on commit d655fd1

Please sign in to comment.