Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@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
FAQs
Ensure that reserved words are quoted in object property keys
The npm package @babel/plugin-transform-property-literals receives a total of 19,438,486 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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.