palladians / pallad

Found unnecessary escape characters JS-0097
Anti-pattern
Minor
20 days ago20 days old
24    })) as Record<string, "ALLOWED">
25    // https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url
26    const URLRegex =
27      /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/28    const appsWithMetadata = await Promise.all(
29      Object.keys(permissions)
30        .filter((key) => URLRegex.test(key))
24    })) as Record<string, "ALLOWED">
25    // https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url
26    const URLRegex =
27      /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/28    const appsWithMetadata = await Promise.all(
29      Object.keys(permissions)
30        .filter((key) => URLRegex.test(key))