fp-refactor
Guides developers in refactoring TypeScript code to functional programming patterns using fp-ts for improved error handling and code clarity.
Install this skill
Security score
The fp-refactor skill was audited on May 15, 2026 and we found 48 security issues across 2 threat categories. Review the findings below before installing.
Categories Tested
Security Issues
Template literal with variable interpolation in command context
| 62 | throw new Error(`Invalid JSON: ${error}`); |
Template literal with variable interpolation in command context
| 113 | E.mapLeft((e) => new Error(`Invalid JSON: ${e}`)) |
Template literal with variable interpolation in command context
| 164 | const response = await fetch(`/api/users/${id}`); |
Template literal with variable interpolation in command context
| 166 | throw new Error(`HTTP error: ${response.status}`); |
Template literal with variable interpolation in command context
| 171 | throw new Error(`Failed to fetch user: ${error}`); |
Template literal with variable interpolation in command context
| 177 | const response = await fetch(`/api/users/${userId}/posts`); |
Template literal with variable interpolation in command context
| 179 | throw new Error(`HTTP error: ${response.status}`); |
Template literal with variable interpolation in command context
| 183 | throw new Error(`Failed to fetch posts: ${error}`); |
Template literal with variable interpolation in command context
| 211 | () => fetch(`/api/users/${id}`), |
Template literal with variable interpolation in command context
| 212 | (reason) => new Error(`Network error: ${reason}`) |
Template literal with variable interpolation in command context
| 217 | : TE.left(new Error(`HTTP error: ${response.status}`)) |
Template literal with variable interpolation in command context
| 222 | (reason) => new Error(`JSON parse error: ${reason}`) |
Template literal with variable interpolation in command context
| 231 | () => fetch(`/api/users/${userId}/posts`), |
Template literal with variable interpolation in command context
| 232 | (reason) => new Error(`Network error: ${reason}`) |
Template literal with variable interpolation in command context
| 237 | : TE.left(new Error(`HTTP error: ${response.status}`)) |
Template literal with variable interpolation in command context
| 242 | (reason) => new Error(`JSON parse error: ${reason}`) |
Template literal with variable interpolation in command context
| 326 | auth = `${config.database.credentials.username}:${config.database.credentials.password}@`; |
Template literal with variable interpolation in command context
| 330 | return `postgres://${auth}${config.database.host}:${port}`; |
Template literal with variable interpolation in command context
| 363 | O.map(({ username, password }) => `${username}:${password}@`) |
Template literal with variable interpolation in command context
| 368 | return `postgres://${auth}${host}:${port}`; |
Template literal with variable interpolation in command context
| 477 | E.fromOption(() => new Error(`User ${id} not found`)) |
Template literal with variable interpolation in command context
| 677 | this.logger.log(`Updating email for user ${userId}`); |
Template literal with variable interpolation in command context
| 681 | this.logger.error(`User ${userId} not found`); |
Template literal with variable interpolation in command context
| 682 | throw new Error(`User ${userId} not found`); |
Template literal with variable interpolation in command context
| 693 | `Your email has been changed to ${newEmail}` |
Template literal with variable interpolation in command context
| 696 | this.logger.log(`Email updated for user ${userId}`); |
Template literal with variable interpolation in command context
| 774 | logInfo(`Updating email for user ${userId}`), |
Template literal with variable interpolation in command context
| 779 | logError(`User ${userId} not found`), |
Template literal with variable interpolation in command context
| 780 | RTE.flatMap(() => RTE.left(new Error(`User ${userId} not found`))) |
Template literal with variable interpolation in command context
| 792 | `Your email has been changed to ${newEmail}` |
Template literal with variable interpolation in command context
| 795 | RTE.flatMap(() => logInfo(`Email updated for user ${userId}`)) |
Template literal with variable interpolation in command context
| 803 | log: (msg) => console.log(`[INFO] ${msg}`), |
Template literal with variable interpolation in command context
| 804 | error: (msg) => console.error(`[ERROR] ${msg}`), |
Template literal with variable interpolation in command context
| 850 | log: (msg) => logs.push(`[INFO] ${msg}`), |
Template literal with variable interpolation in command context
| 851 | error: (msg) => logs.push(`[ERROR] ${msg}`), |
Template literal with variable interpolation in command context
| 1136 | return fetch(`/api/users/${userId}`) |
Template literal with variable interpolation in command context
| 1139 | throw new Error(`HTTP ${response.status}`); |
Template literal with variable interpolation in command context
| 1180 | () => fetch(`/api/users/${userId}`), |
Template literal with variable interpolation in command context
| 1181 | (e) => new Error(`Network error: ${e}`) |
Template literal with variable interpolation in command context
| 1187 | (e) => new Error(`Parse error: ${e}`) |
Template literal with variable interpolation in command context
| 1189 | : TE.left(new Error(`HTTP ${response.status}`)) |
Template literal with variable interpolation in command context
| 1396 | (reason) => new Error(`Network request failed: ${reason}`) |
Template literal with variable interpolation in command context
| 1492 | throw new Error(`API error: ${result.left.type}`); |
Template literal with variable interpolation in command context
| 1615 | return `${first} ${last}`; |
Template literal with variable interpolation in command context
| 1622 | (f) => `${f} ${last}` |
Fetch to external URL
| 1386 | () => fetch('/api/data'), |
Fetch to external URL
| 1395 | () => fetch('/api/data'), |
Fetch to external URL
| 1409 | () => fetch('/api/data'), |