Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Meant to automatically fix your JavaScript errors in a non-destructive way.
npm install fixmyjs -g
fixmyjs your_file.js
var fixmyjs = require('fixmyjs')
var stringFixedCode = fixmyjs.fix(stringOfCode, objectOfOptions)
When the options are set to true they are enabled. To get a breakdown of what is enabled by default check out package.json
camelcase
- Converts all identifiers to camelCasecurly
- Adds curly braces to all statements that don't have themcurlyfor
- Adds curly braces only to for statementscurlyif
- Adds curly braces only to if/if-else statementscurlywhile
- Adds curly braces only to while statementsdebug
- Removes debugger statementsdecimals
- Adds a leading 0
for decimals or removes trailing zero if decimal is wholedelete
- Removes deletion of variablesemptyStatement
- Removes empty statementseqeqeq
- Enforce strict equalityes3
- Enforces parseIntRadix
as well as no-comma-dangle
hoist
- Hoists all your vars to the top of the functioninitUndefined
- Rewrites variable initializations to undefinedinvalidConstructor
- Does not allow you to initialize built-in primitive constructorsinvokeConstructors
- Adds ()
to any new expressionsisNan
- Replaces equality to NaN with isNaNmultivar
- Replace single var with multi line varno-comma-dangle
- Removes trailing commasnonew
- Removes new when using it for side effectsonevar
- Make multi var into one varparseIntRadix
- Adds a radix parameter to parseIntplusplus
- Converts ++
and --
to += 1
|| -= 1
rmdelete
- Removes the deletion of variablesrmempty
- Removes empty statementssnakecase
- Convert all identifiers to snake_casesub
- Dot notation conversionuseLiteral
- Rewrites your primitives to use their literal formes3
now enables no-comma-dangle
as well as new option parseIntRadix
.FAQs
Automatically fixes your JavaScript based on lint rules
We found that fixmyjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.