Skip to content

Commit

Permalink
web: omit unneeded function param in createCapaRulesUrl (#2342)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ff authored Aug 29, 2024
1 parent 729a1a8 commit 68e07fb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions web/explorer/src/utils/urlHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@ export function createATTACKHref(attack) {
}

/**
* Creates a CAPA rules URL for a given node with tag.
* Creates an href for a given rule in the rules website
*
* @param {Object} node - The node object containing data about the rule.
* @param {string} node.data.namespace - The namespace of the rule (optional).
* @param {Object} node - The node object
* @param {string} node.data.name - The name of the rule.
* @returns {string} The formatted CAPA rules URL.
* @returns {string} The formatted capa rules URL.
*/
export function createCapaRulesUrl(node, tag) {
if (!node || !node.data || !tag) return null;
export function createCapaRulesUrl(node) {
if (!node || !node.data) return null;
const ruleName = node.data.name.toLowerCase().replace(/\s+/g, "-");
return `https://mandiant.github.io/capa/rules/${ruleName}/`;
}
Expand Down

0 comments on commit 68e07fb

Please sign in to comment.