file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/wraps-props-in-react-spread-for-middle-spread-attributes/input.js
JavaScript
<Component y={2} {...x} z />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/wraps-props-in-react-spread-for-middle-spread-attributes/output.mjs
JavaScript
/*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime"; _jsx(Component, { y: 2, ...x, z: true });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.adds-appropriate-newlines-when-using-spread-attribute-babel-7/input.js
JavaScript
<Component {...props} sound="moo" />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.adds-appropriate-newlines-when-using-spread-attribute-babel-7/output.js
JavaScript
/*#__PURE__*/ React.createElement(Component, babelHelpers.extends({}, props, { sound: "moo" }));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.arrow-functions/input.js
JavaScript
var foo = function () { return () => <this />; }; var bar = function () { return () => <this.foo />; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.arrow-functions/output.js
JavaScript
var foo = function () { var _this = this; return function () { return /*#__PURE__*/React.createElement(_this, null); }; }; var bar = function () { var _this2 = this; return function () { return /*#__PURE__*/React.createElement(_this2.foo, null); }; };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.assignment-babel-7/input.js
JavaScript
var div = <Component {...props} foo="bar" />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.assignment-babel-7/output.js
JavaScript
var div = /*#__PURE__*/React.createElement(Component, babelHelpers.extends({}, props, { foo: "bar" }));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.avoids-spread-babel-7/input.js
JavaScript
<E {...props} last />; <E first {...props} />; <E {...pre} {...suf} />; <E first {...pre} mid {...suf} />; <E {...pre} mid {...suf} last />; <E {...pre} mid1 mid2 {...suf} />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.avoids-spread-babel-7/output.js
JavaScript
/*#__PURE__*/ React.createElement(E, babelHelpers.extends({}, props, { last: true })); /*#__PURE__*/ React.createElement(E, babelHelpers.extends({ first: true }, props)); /*#__PURE__*/ React.createElement(E, babelHelpers.extends({}, pre, suf)); /*#__PURE__*/ React.createElement(E, babelHelpers.extends({ first: true }, pre, { mid: true }, suf)); /*#__PURE__*/ React.createElement(E, babelHelpers.extends({}, pre, { mid: true }, suf, { last: true })); /*#__PURE__*/ React.createElement(E, babelHelpers.extends({}, pre, { mid1: true, mid2: true }, suf));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.jsx-with-retainlines-option/input.js
JavaScript
var div = <div>test</div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.jsx-with-retainlines-option/output.js
JavaScript
var div = /*#__PURE__*/React.createElement("div", null, "test");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.optimisation.react.constant-elements/input.js
JavaScript
class App extends React.Component { render() { const navbarHeader = ( <div className="navbar-header"> <a className="navbar-brand" href="/"> <img src="/img/logo/logo-96x36.png" /> </a> </div> ); return ( <div> <nav className="navbar navbar-default"> <div className="container">{navbarHeader}</div> </nav> </div> ); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.optimisation.react.constant-elements/output.js
JavaScript
function _create_super(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } var _ref = <div className="navbar-header"> <a className="navbar-brand" href="/"> <img src="/img/logo/logo-96x36.png" /> </a> </div>; let App = /*#__PURE__*/function (_React$Component) { "use strict"; babelHelpers.inherits(App, _React$Component); var _super = _create_super(App); function App() { babelHelpers.classCallCheck(this, App); return _super.apply(this, arguments); } babelHelpers.createClass(App, [{ key: "render", value: function render() { const navbarHeader = _ref; return <div> <nav className="navbar navbar-default"> <div className="container"> {navbarHeader} </div> </nav> </div>; } }]); return App; }(React.Component);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.should-add-quotes-es3/input.js
JavaScript
var es3 = <F aaa new const var default foo-bar />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.should-add-quotes-es3/output.js
JavaScript
var es3 = /*#__PURE__*/React.createElement(F, { aaa: true, "new": true, "const": true, "var": true, "default": true, "foo-bar": true });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.should-properly-handle-comments-adjacent-to-children/input.js
JavaScript
var x = ( <div> {/* A comment at the beginning */} {/* A second comment at the beginning */} <span>{/* A nested comment */}</span> {/* A sandwiched comment */} <br /> {/* A comment at the end */} {/* A second comment at the end */} </div> );
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.should-warn-when-importSource-is-set/input.js
JavaScript
/** @jsxRuntime classic */ var div = <div>test</div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.should-warn-when-importSource-pragma-is-set/input.js
JavaScript
/** @jsxRuntime classic */ /** @jsxImportSource foo */ var div = <div>test</div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.wraps-props-in-react-spread-for-first-spread-attributes-babel-7/input.js
JavaScript
<Component {...x} y={2} z />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.wraps-props-in-react-spread-for-first-spread-attributes-babel-7/output.js
JavaScript
/*#__PURE__*/ React.createElement(Component, babelHelpers.extends({}, x, { y: 2, z: true }));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.wraps-props-in-react-spread-for-last-spread-attributes-babel-7/input.js
JavaScript
<Component y={2} z {...x} />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.wraps-props-in-react-spread-for-last-spread-attributes-babel-7/output.js
JavaScript
/*#__PURE__*/ React.createElement(Component, babelHelpers.extends({ y: 2, z: true }, x));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.wraps-props-in-react-spread-for-middle-spread-attributes-babel-7/input.js
JavaScript
<Component y={2} {...x} z />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/.wraps-props-in-react-spread-for-middle-spread-attributes-babel-7/output.js
JavaScript
/*#__PURE__*/ React.createElement(Component, babelHelpers.extends({ y: 2 }, x, { z: true }));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/adds-appropriate-newlines-when-using-spread-attribute/input.js
JavaScript
<Component {...props} sound="moo" />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/adds-appropriate-newlines-when-using-spread-attribute/output.js
JavaScript
/*#__PURE__*/ React.createElement(Component, { ...props, sound: "moo" });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/assignment/input.js
JavaScript
var div = <Component {...props} foo="bar" />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/assignment/output.js
JavaScript
var div = /*#__PURE__*/React.createElement(Component, { ...props, foo: "bar" });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/concatenates-adjacent-string-literals/input.js
JavaScript
var x = ( <div> foo {"bar"} baz <div>buz bang</div> qux {null} quack </div> );
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/concatenates-adjacent-string-literals/output.js
JavaScript
var x = /*#__PURE__*/React.createElement("div", null, "foo", "bar", "baz", /*#__PURE__*/React.createElement("div", null, "buz bang"), "qux", null, "quack");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/does-not-add-source-self-babel-7/input.mjs
JavaScript
var x = ( <> <div> <div key="1" /> <div key="2" meow="wolf" /> <div key="3" /> <div {...props} key="4" /> </div> </> );
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/does-not-add-source-self-babel-7/output.mjs
JavaScript
var x = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", { key: "1" }), /*#__PURE__*/React.createElement("div", { key: "2", meow: "wolf" }), /*#__PURE__*/React.createElement("div", { key: "3" }), /*#__PURE__*/React.createElement("div", babelHelpers.extends({}, props, { key: "4" }))));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/does-not-add-source-self/input.mjs
JavaScript
var x = ( <> <div> <div key="1" /> <div key="2" meow="wolf" /> <div key="3" /> <div {...props} key="4" /> </div> </> );
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/does-not-add-source-self/output.mjs
JavaScript
var x = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", { key: "1" }), /*#__PURE__*/React.createElement("div", { key: "2", meow: "wolf" }), /*#__PURE__*/React.createElement("div", { key: "3" }), /*#__PURE__*/React.createElement("div", { ...props, key: "4" })));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/dont-coerce-expression-containers/input.js
JavaScript
<Text> To get started, edit index.ios.js!!!{"\n"} Press Cmd+R to reload </Text>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/dont-coerce-expression-containers/output.js
JavaScript
/*#__PURE__*/ React.createElement(Text, null, "To get started, edit index.ios.js!!!", "\n", "Press Cmd+R to reload");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/duplicate-props/input.js
JavaScript
<p prop prop> text </p>; <p {...{ prop, prop }}>text</p>; <p prop {...{ prop }}> text </p>; <p {...{ prop }} prop> text </p>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/duplicate-props/output.js
JavaScript
/*#__PURE__*/ React.createElement("p", { prop: true, prop: true }, "text"); /*#__PURE__*/ React.createElement("p", { prop, prop }, "text"); /*#__PURE__*/ React.createElement("p", { prop: true, prop }, "text"); /*#__PURE__*/ React.createElement("p", { prop, prop: true }, "text");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/flattens-spread/input.js
JavaScript
<p {...props}>text</p>; <div {...props}>{contents}</div>; <img alt="" {...{ src, title }} />; <blockquote {...{ cite }}>{items}</blockquote>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/flattens-spread/output.js
JavaScript
/*#__PURE__*/ React.createElement("p", props, "text"); /*#__PURE__*/ React.createElement("div", props, contents); /*#__PURE__*/ React.createElement("img", { alt: "", src, title }); /*#__PURE__*/ React.createElement("blockquote", { cite }, items);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/honor-custom-jsx-comment-if-jsx-pragma-option-set/input.js
JavaScript
/** @jsx dom */ <Foo></Foo>; var profile = ( <div> <img src="avatar.png" className="profile" /> <h3>{[user.firstName, user.lastName].join(" ")}</h3> </div> );
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/honor-custom-jsx-comment-if-jsx-pragma-option-set/output.js
JavaScript
/** @jsx dom */ /*#__PURE__*/ dom(Foo, null); var profile = /*#__PURE__*/ dom("div", null, /*#__PURE__*/ dom("img", { src: "avatar.png", className: "profile" }), /*#__PURE__*/ dom("h3", null, [ user.firstName, user.lastName ].join(" ")));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/honor-custom-jsx-comment/input.js
JavaScript
/** @jsx dom */ <Foo></Foo>; var profile = ( <div> <img src="avatar.png" className="profile" /> <h3>{[user.firstName, user.lastName].join(" ")}</h3> </div> );
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/honor-custom-jsx-comment/output.js
JavaScript
/** @jsx dom */ /*#__PURE__*/ dom(Foo, null); var profile = /*#__PURE__*/ dom("div", null, /*#__PURE__*/ dom("img", { src: "avatar.png", className: "profile" }), /*#__PURE__*/ dom("h3", null, [ user.firstName, user.lastName ].join(" ")));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/honor-custom-jsx-pragma-option/input.js
JavaScript
<Foo></Foo>; var profile = ( <div> <img src="avatar.png" className="profile" /> <h3>{[user.firstName, user.lastName].join(" ")}</h3> </div> );
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/honor-custom-jsx-pragma-option/output.js
JavaScript
/*#__PURE__*/ dom(Foo, null); var profile = /*#__PURE__*/ dom("div", null, /*#__PURE__*/ dom("img", { src: "avatar.png", className: "profile" }), /*#__PURE__*/ dom("h3", null, [ user.firstName, user.lastName ].join(" ")));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/jsx-without-retainlines-option/input.js
JavaScript
var div = <div>test</div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/jsx-without-retainlines-option/output.js
JavaScript
var div = /*#__PURE__*/React.createElement("div", null, "test");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/pragma-works-with-no-space-at-the-end/input.js
JavaScript
/* @jsx foo*/ <div>Hi</div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/pragma-works-with-no-space-at-the-end/output.js
JavaScript
/* @jsx foo*/ /*#__PURE__*/ foo("div", null, "Hi");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-constructor-as-prop/input.js
JavaScript
<Component constructor="foo" />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-constructor-as-prop/output.js
JavaScript
/*#__PURE__*/ React.createElement(Component, { constructor: "foo" });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-deeper-js-namespacing/input.js
JavaScript
<Namespace.DeepNamespace.Component />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-deeper-js-namespacing/output.js
JavaScript
/*#__PURE__*/ React.createElement(Namespace.DeepNamespace.Component, null);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-elements-as-attributes/input.js
JavaScript
<div attr=<div /> />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-elements-as-attributes/output.js
JavaScript
/*#__PURE__*/ React.createElement("div", { attr: /*#__PURE__*/React.createElement("div", null) });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-js-namespacing/blacklist.js
JavaScript
React.createElement(Namespace.Component, null);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-js-namespacing/input.js
JavaScript
<Namespace.Component />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-js-namespacing/output.js
JavaScript
/*#__PURE__*/ React.createElement(Namespace.Component, null);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-multiple-pragmas-per-line/input.js
JavaScript
/* @jsxRuntime automatic @jsxImportSource preact */ var div = <div>test</div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-multiple-pragmas-per-line/output.js
JavaScript
/* @jsxRuntime automatic @jsxImportSource preact */ import { jsx as _jsx } from "preact/jsx-runtime"; var div = /*#__PURE__*/ _jsx("div", { children: "test" });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-nested-fragments/input.js
JavaScript
<div> <> <> <span>Hello</span> <span>world</span> </> <> <span>Goodbye</span> <span>world</span> </> </> </div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-nested-fragments/output.js
JavaScript
/*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "Hello"), /*#__PURE__*/React.createElement("span", null, "world")), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, "Goodbye"), /*#__PURE__*/React.createElement("span", null, "world"))));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-no-pragmafrag-if-frag-unused/input.js
JavaScript
/** @jsx dom */ <div>no fragment is used</div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-no-pragmafrag-if-frag-unused/output.js
JavaScript
/** @jsx dom */ /*#__PURE__*/ dom("div", null, "no fragment is used");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-pragmafrag-and-frag/input.js
JavaScript
/** @jsx dom */ /** @jsxFrag DomFrag */ <></>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-allow-pragmafrag-and-frag/output.js
JavaScript
/** @jsx dom */ /** @jsxFrag DomFrag */ /*#__PURE__*/ dom(DomFrag, null);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-avoid-wrapping-in-extra-parens-if-not-needed/input.js
JavaScript
var x = ( <div> <Component /> </div> ); var x = <div>{props.children}</div>; var x = <Composite>{props.children}</Composite>; var x = ( <Composite> <Composite2 /> </Composite> );
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-avoid-wrapping-in-extra-parens-if-not-needed/output.js
JavaScript
var x = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Component, null)); var x = /*#__PURE__*/React.createElement("div", null, props.children); var x = /*#__PURE__*/React.createElement(Composite, null, props.children); var x = /*#__PURE__*/React.createElement(Composite, null, /*#__PURE__*/React.createElement(Composite2, null));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-convert-simple-tags/input.js
JavaScript
var x = <div></div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-convert-simple-tags/output.js
JavaScript
var x = /*#__PURE__*/React.createElement("div", null);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-convert-simple-text/input.js
JavaScript
var x = <div>text</div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-convert-simple-text/output.js
JavaScript
var x = /*#__PURE__*/React.createElement("div", null, "text");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-disallow-spread-children/input.js
JavaScript
<div>{...children}</div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-disallow-spread-children/output.mjs
JavaScript
/*#__PURE__*/ React.createElement("div", null, ...children);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-disallow-xml-namespacing/input.js
JavaScript
<Namespace:Component />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-disallow-xml-namespacing/output.mjs
JavaScript
/*#__PURE__*/ React.createElement("Namespace:Component", null);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-escape-xhtml-jsxattribute-babel-7/input.js
JavaScript
<div id="wôw" />; <div id="\w" />; <div id="w &lt; w" />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-escape-xhtml-jsxattribute-babel-7/output.js
JavaScript
/*#__PURE__*/ React.createElement("div", { id: "wôw" }); /*#__PURE__*/ React.createElement("div", { id: "\\w" }); /*#__PURE__*/ React.createElement("div", { id: "w < w" });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-escape-xhtml-jsxattribute/input.js
JavaScript
<div id="wôw" />; <div id="\w" />; <div id="w &lt; w" />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-escape-xhtml-jsxattribute/output.js
JavaScript
/*#__PURE__*/ React.createElement("div", { id: "wôw" }); /*#__PURE__*/ React.createElement("div", { id: "\\w" }); /*#__PURE__*/ React.createElement("div", { id: "w < w" });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-escape-xhtml-jsxtext-babel-7/input.js
JavaScript
<div>wow</div>; <div>wôw</div>; <div>w & w</div>; <div>w &amp; w</div>; <div>w &nbsp; w</div>; <div>this should not parse as unicode: \u00a0</div>; <div>this should parse as nbsp:   </div>; <div>this should parse as unicode: {"\u00a0 "}</div>; <div>w &lt; w</div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-escape-xhtml-jsxtext-babel-7/output.js
JavaScript
/*#__PURE__*/ React.createElement("div", null, "wow"); /*#__PURE__*/ React.createElement("div", null, "wôw"); /*#__PURE__*/ React.createElement("div", null, "w & w"); /*#__PURE__*/ React.createElement("div", null, "w & w"); /*#__PURE__*/ React.createElement("div", null, "w   w"); /*#__PURE__*/ React.createElement("div", null, "this should not parse as unicode: \\u00a0"); /*#__PURE__*/ React.createElement("div", null, "this should parse as nbsp:   "); /*#__PURE__*/ React.createElement("div", null, "this should parse as unicode: ", "\u00a0 "); /*#__PURE__*/ React.createElement("div", null, "w < w");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-escape-xhtml-jsxtext/input.js
JavaScript
<div>wow</div>; <div>wôw</div>; <div>w & w</div>; <div>w &amp; w</div>; <div>w &nbsp; w</div>; <div>this should not parse as unicode: \u00a0</div>; <div>this should parse as nbsp:   </div>; <div>this should parse as unicode: {"\u00a0 "}</div>; <div>w &lt; w</div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-escape-xhtml-jsxtext/output.js
JavaScript
/*#__PURE__*/ React.createElement("div", null, "wow"); /*#__PURE__*/ React.createElement("div", null, "wôw"); /*#__PURE__*/ React.createElement("div", null, "w & w"); /*#__PURE__*/ React.createElement("div", null, "w & w"); /*#__PURE__*/ React.createElement("div", null, "w   w"); /*#__PURE__*/ React.createElement("div", null, "this should not parse as unicode: \\u00a0"); /*#__PURE__*/ React.createElement("div", null, "this should parse as nbsp:   "); /*#__PURE__*/ React.createElement("div", null, "this should parse as unicode: ", "\u00a0 "); /*#__PURE__*/ React.createElement("div", null, "w < w");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-handle-attributed-elements/input.js
JavaScript
var HelloMessage = React.createClass({ render: function () { return <div>Hello {this.props.name}</div>; }, }); React.render(<HelloMessage name={<span>Sebastian</span>} />, mountNode);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-handle-attributed-elements/output.js
JavaScript
var HelloMessage = React.createClass({ render: function() { return /*#__PURE__*/ React.createElement("div", null, "Hello ", this.props.name); }, displayName: "HelloMessage" }); React.render(/*#__PURE__*/ React.createElement(HelloMessage, { name: /*#__PURE__*/ React.createElement("span", null, "Sebastian") }), mountNode);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-handle-has-own-property-correctly/input.js
JavaScript
<hasOwnProperty>testing</hasOwnProperty>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-handle-has-own-property-correctly/output.js
JavaScript
/*#__PURE__*/ React.createElement("hasOwnProperty", null, "testing");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-have-correct-comma-in-nested-children/input.js
JavaScript
var x = ( <div> <div> <br /> </div> <Component> {foo} <br /> {bar} </Component> <br /> </div> );
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-have-correct-comma-in-nested-children/output.js
JavaScript
var x = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("br", null)), /*#__PURE__*/React.createElement(Component, null, foo, /*#__PURE__*/React.createElement("br", null), bar), /*#__PURE__*/React.createElement("br", null));
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-insert-commas-after-expressions-before-whitespace/input.js
JavaScript
var x = ( <div attr1={"foo" + "bar"} attr2={"foo" + "bar" + "baz" + "bug"} attr3={"foo" + "bar" + "baz" + "bug"} attr4="baz" ></div> );
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-insert-commas-after-expressions-before-whitespace/output.js
JavaScript
var x = /*#__PURE__*/React.createElement("div", { attr1: "foo" + "bar", attr2: "foo" + "bar" + "baz" + "bug", attr3: "foo" + "bar" + "baz" + "bug", attr4: "baz" });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-not-add-quotes-to-identifier-names/input.js
JavaScript
var e = <F aaa new const var default foo-bar />;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-not-add-quotes-to-identifier-names/output.js
JavaScript
var e = /*#__PURE__*/React.createElement(F, { aaa: true, new: true, const: true, var: true, default: true, "foo-bar": true });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-not-mangle-expressioncontainer-attribute-values/input.js
JavaScript
<button data-value={"a value\n with\nnewlines\n and spaces"}>Button</button>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-not-mangle-expressioncontainer-attribute-values/output.js
JavaScript
/*#__PURE__*/ React.createElement("button", { "data-value": "a value\n with\nnewlines\n and spaces" }, "Button");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-not-strip-nbsp-even-coupled-with-other-whitespace/input.js
JavaScript
<div>&nbsp; </div>;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_react/tests/jsx/fixture/react/should-not-strip-nbsp-even-coupled-with-other-whitespace/output.js
JavaScript
/*#__PURE__*/ React.createElement("div", null, "  ");
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University