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.
@babel/plugin-transform-property-literals
Advanced tools
Ensure that reserved words are quoted in object property keys
The @babel/plugin-transform-property-literals package is a Babel plugin that transforms object properties to use literals when they are valid identifiers. This transformation can help improve code readability and potentially optimize execution by leveraging engine optimizations for property access.
Transforming Reserved Word Properties
Transforms reserved word properties into literal properties if they are valid identifiers, ensuring compatibility and potentially improving execution speed.
{"var": "value"} // Before transformation
{"var": "value"} // After transformation
Transforming Numeric Properties
Automatically transforms numeric properties into their literal form, enhancing code readability and leveraging engine optimizations.
{"123": "value"} // Before transformation
{123: "value"} // After transformation
This plugin transforms reserved words into a form that can be safely used as property keys. It is similar to @babel/plugin-transform-property-literals but focuses more on reserved words in JavaScript.
Transforms property mutators to use a more compatible syntax. While it deals with properties, its focus is more on the mutation aspect rather than transforming property keys into literals.
Ensure that reserved words are quoted in object property keys
See our website @babel/plugin-transform-property-literals for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-property-literals
or using yarn:
yarn add @babel/plugin-transform-property-literals --dev
v7.25.9 (2024-10-22)
babel-parser
, babel-template
, babel-types
syntacticPlaceholders
mode (@liuxingbaoyu)babel-helper-compilation-targets
, babel-preset-env
ClassAccessorProperty
to prevent the no-undef
rule (@victorenator)babel-parser
, babel-types
VISITOR_KEYS
etc. faster to access (@liuxingbaoyu)FAQs
Ensure that reserved words are quoted in object property keys
The npm package @babel/plugin-transform-property-literals receives a total of 23,909,961 weekly downloads. As such, @babel/plugin-transform-property-literals popularity was classified as popular.
We found that @babel/plugin-transform-property-literals demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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.