
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.
babel-plugin-transform-dulcet-jsx
Advanced tools
Turn JSX into Dulcet function calls
In
var profile = <div>
<img src="avatar.png" className="profile" />
<h3>{[user.firstName, user.lastName].join(' ')}</h3>
</div>;
Out
var profile = Dulcet.createElement("div", null,
Dulcet.createElement("img", { src: "avatar.png", className: "profile" }),
Dulcet.createElement("h3", null, [user.firstName, user.lastName].join(" "))
);
In
/** @jsx dom */
var { dom } = require("deku");
var profile = <div>
<img src="avatar.png" className="profile" />
<h3>{[user.firstName, user.lastName].join(' ')}</h3>
</div>;
Out
/** @jsx dom */
var dom = require("deku").dom;
var profile = dom( "div", null,
dom("img", { src: "avatar.png", className: "profile" }),
dom("h3", null, [user.firstName, user.lastName].join(" "))
);
npm install --save-dev babel-plugin-transform-dulcet-jsx
.babelrc (Recommended).babelrc
Without options:
{
"plugins": ["transform-dulcet-jsx"]
}
With options:
{
"plugins": [
["transform-dulcet-jsx", {
"pragma": "dom" // default pragma is Dulcet.createElement
}]
]
}
babel --plugins transform-dulcet-jsx script.js
require("babel-core").transform("code", {
plugins: ["transform-dulcet-jsx"]
});
pragmastring, defaults to Dulcet.createElement.
Replace the function used when compiling JSX expressions.
Note that the @jsx Dulcet.DOM pragma has been deprecated as of Dulcet v0.12
useBuiltInsboolean, defaults to false.
When spreading props, use Object.assign directly instead of Babel's extend helper.
FAQs
Turn JSX into Dulcet function calls
The npm package babel-plugin-transform-dulcet-jsx receives a total of 0 weekly downloads. As such, babel-plugin-transform-dulcet-jsx popularity was classified as not popular.
We found that babel-plugin-transform-dulcet-jsx 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
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.