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/.should-escape-xhtml-jsxtext-babel-7/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
/*#__PURE__*/
_jsx("div", {
children: "wow"
});
/*#__PURE__*/
_jsx("div", {
children: "w\xF4w"
});
/*#__PURE__*/
_jsx("div", {
children: "w & w"
});
/*#__PURE__*/
_jsx("div", {
children: "w & w"
});
/*#__PURE__*/
_jsx("div", {
children: "w \xA0 w"
});
/*#__PURE__*/
_jsx("div", {
children: "this should not parse as unicode: \\u00a0"
});
/*#__PURE__*/
_jsx("div", {
children: "this should parse as nbsp: \xA0 "
});
/*#__PURE__*/
_jsxs("div", {
children: ["this should parse as unicode: ", '\u00a0 ']
});
/*#__PURE__*/
_jsx("div", {
children: "w < w"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/.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-automatic/.should-warn-when-pragma-or-pragmaFrag-is-set/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-automatic/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-automatic/adds-appropriate-newlines-when-using-spread-attribute/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx(Component, {
...props,
sound: "moo"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/assignment/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
var div = /*#__PURE__*/ _jsx(Component, {
...props,
foo: "bar"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/concatenates-adjacent-string-literals/output.mjs | JavaScript | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var x = /*#__PURE__*/ _jsxs("div", {
children: [
"foo",
"bar",
"baz",
/*#__PURE__*/ _jsx("div", {
children: "buz bang"
}),
"qux",
null,
"quack"
]
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/does-not-add-source-self-automatic/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-automatic/does-not-add-source-self-automatic/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
import { createElement as _createElement } from "react";
import { jsxs as _jsxs } from "react/jsx-runtime";
import { Fragment as _Fragment } from "react/jsx-runtime";
var x = /*#__PURE__*/_jsx(_Fragment, {
children: /*#__PURE__*/_jsxs("div", {
children: [/*#__PURE__*/_jsx("div", {}, "1"), /*#__PURE__*/_jsx("div", {
meow: "wolf"
}, "2"), /*#__PURE__*/_jsx("div", {}, "3"), /*#__PURE__*/_createElement("div", { ...props,
key: "4"
})]
})
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/dont-coerce-expression-containers/output.mjs | JavaScript | /*#__PURE__*/ import { jsxs as _jsxs } from "react/jsx-runtime";
_jsxs(Text, {
children: [
"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-automatic/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-automatic/duplicate-props/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("p", {
prop: true,
prop: true,
children: "text"
});
/*#__PURE__*/ _jsx("p", {
prop,
prop,
children: "text"
});
/*#__PURE__*/ _jsx("p", {
prop: true,
prop,
children: "text"
});
/*#__PURE__*/ _jsx("p", {
prop,
prop: true,
children: "text"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/flattens-spread/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("p", {
...props,
children: "text"
});
/*#__PURE__*/ _jsx("div", {
...props,
children: contents
});
/*#__PURE__*/ _jsx("img", {
alt: "",
src,
title
});
/*#__PURE__*/ _jsx("blockquote", {
cite,
children: items
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/handle-fragments-with-key/input.js | JavaScript | import * as React from "react";
var x = <React.Fragment key="foo"></React.Fragment>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/handle-fragments-with-key/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
import * as React from "react";
var x = /*#__PURE__*/ _jsx(React.Fragment, {}, "foo");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/handle-fragments-with-no-children/input.js | JavaScript | var x = <></>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/handle-fragments-with-no-children/output.mjs | JavaScript | import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
var x = /*#__PURE__*/ _jsx(_Fragment, {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/handle-fragments/input.js | JavaScript | var x = (
<>
<div />
</>
);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/handle-fragments/output.mjs | JavaScript | import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
var x = /*#__PURE__*/ _jsx(_Fragment, {
children: /*#__PURE__*/ _jsx("div", {})
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/handle-nonstatic-children/input.js | JavaScript | var x = <div>{[<span key={"0"} />, <span key={"1"} />]}</div>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/handle-nonstatic-children/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
var x = /*#__PURE__*/ _jsx("div", {
children: [
/*#__PURE__*/ _jsx("span", {}, "0"),
/*#__PURE__*/ _jsx("span", {}, "1")
]
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/handle-static-children/input.js | JavaScript | var x = (
<div>
<span />
{[<span key={"0"} />, <span key={"1"} />]}
</div>
);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/handle-static-children/output.mjs | JavaScript | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var x = /*#__PURE__*/ _jsxs("div", {
children: [
/*#__PURE__*/ _jsx("span", {}),
[
/*#__PURE__*/ _jsx("span", {}, "0"),
/*#__PURE__*/ _jsx("span", {}, "1")
]
]
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/jsx-without-retainlines-option/output.mjs | JavaScript | import { jsx as _jsx } from "react/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-automatic/key-undefined-works/input.js | JavaScript | const props = { foo: true };
var x = <div {...props} key={undefined}></div>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/key-undefined-works/output.mjs | JavaScript | import { createElement as _createElement } from "react";
const props = {
foo: true
};
var x = /*#__PURE__*/_createElement("div", { ...props,
key: undefined
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/pragma-works-with-no-space-at-the-end/input.js | JavaScript | /* @jsxImportSource foo*/
<div>Hi</div>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/pragma-works-with-no-space-at-the-end/output.mjs | JavaScript | /* @jsxImportSource foo*/ /*#__PURE__*/ import { jsx as _jsx } from "foo/jsx-runtime";
_jsx("div", {
children: "Hi"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-allow-constructor-as-prop/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx(Component, {
constructor: "foo"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-allow-deeper-js-namespacing/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx(Namespace.DeepNamespace.Component, {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-allow-elements-as-attributes/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("div", {
attr: /*#__PURE__*/ _jsx("div", {})
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/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-automatic/should-allow-js-namespacing/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx(Namespace.Component, {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-allow-nested-fragments/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
_jsx("div", {
children: /*#__PURE__*/ _jsxs(_Fragment, {
children: [
/*#__PURE__*/ _jsxs(_Fragment, {
children: [
/*#__PURE__*/ _jsx("span", {
children: "Hello"
}),
/*#__PURE__*/ _jsx("span", {
children: "world"
})
]
}),
/*#__PURE__*/ _jsxs(_Fragment, {
children: [
/*#__PURE__*/ _jsx("span", {
children: "Goodbye"
}),
/*#__PURE__*/ _jsx("span", {
children: "world"
})
]
})
]
})
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-avoid-wrapping-in-extra-parens-if-not-needed/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
var x = /*#__PURE__*/_jsx("div", {
children: /*#__PURE__*/_jsx(Component, {})
});
var x = /*#__PURE__*/_jsx("div", {
children: props.children
});
var x = /*#__PURE__*/_jsx(Composite, {
children: props.children
});
var x = /*#__PURE__*/_jsx(Composite, {
children: /*#__PURE__*/_jsx(Composite2, {})
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-convert-simple-tags/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
var x = /*#__PURE__*/_jsx("div", {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-convert-simple-text/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
var x = /*#__PURE__*/_jsx("div", {
children: "text"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-detect-static-jsx/input.js | JavaScript | const h1 = <h1></h1>
const h2 = <h2>{}</h2>
const h3 = <h3>{a}</h3>
const h4 = <h4>{a}b</h4>
const h5 = <h5>{...a}</h5>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-detect-static-jsx/output.mjs | JavaScript | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
const h1 = /*#__PURE__*/ _jsx("h1", {});
const h2 = /*#__PURE__*/ _jsx("h2", {});
const h3 = /*#__PURE__*/ _jsx("h3", {
children: a
});
const h4 = /*#__PURE__*/ _jsxs("h4", {
children: [
a,
"b"
]
});
const h5 = /*#__PURE__*/ _jsxs("h5", {
children: [
...a
]
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-disallow-spread-children/output.mjs | JavaScript | /*#__PURE__*/ import { jsxs as _jsxs } from "react/jsx-runtime";
_jsxs("div", {
children: [
...children
]
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-disallow-xml-namespacing/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("Namespace:Component", {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-escape-xhtml-jsxattribute/input.js | JavaScript | <div id="wôw" />;
<div id="\w" />;
<div id="w < w" />;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-escape-xhtml-jsxattribute/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("div", {
id: "wôw"
});
/*#__PURE__*/ _jsx("div", {
id: "\\w"
});
/*#__PURE__*/ _jsx("div", {
id: "w < w"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-escape-xhtml-jsxtext/input.js | JavaScript | <div>wow</div>;
<div>wôw</div>;
<div>w & w</div>;
<div>w & w</div>;
<div>w 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 < w</div>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-escape-xhtml-jsxtext/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
_jsx("div", {
children: "wow"
});
/*#__PURE__*/ _jsx("div", {
children: "wôw"
});
/*#__PURE__*/ _jsx("div", {
children: "w & w"
});
/*#__PURE__*/ _jsx("div", {
children: "w & w"
});
/*#__PURE__*/ _jsx("div", {
children: "w w"
});
/*#__PURE__*/ _jsx("div", {
children: "this should not parse as unicode: \\u00a0"
});
/*#__PURE__*/ _jsx("div", {
children: "this should parse as nbsp: "
});
/*#__PURE__*/ _jsxs("div", {
children: [
"this should parse as unicode: ",
"\u00a0 "
]
});
/*#__PURE__*/ _jsx("div", {
children: "w < w"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-handle-attributed-elements/output.mjs | JavaScript | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var HelloMessage = React.createClass({
render: function () {
return /*#__PURE__*/_jsxs("div", {
children: ["Hello ", this.props.name]
});
},
displayName: "HelloMessage",
});
React.render( /*#__PURE__*/_jsx(HelloMessage, {
name: /*#__PURE__*/_jsx("span", {
children: "Sebastian"
})
}), mountNode);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-handle-has-own-property-correctly/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("hasOwnProperty", {
children: "testing"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-have-correct-comma-in-nested-children/output.mjs | JavaScript | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var x = /*#__PURE__*/_jsxs("div", {
children: [/*#__PURE__*/_jsx("div", {
children: /*#__PURE__*/_jsx("br", {})
}), /*#__PURE__*/_jsxs(Component, {
children: [foo, /*#__PURE__*/_jsx("br", {}), bar]
}), /*#__PURE__*/_jsx("br", {})]
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/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-automatic/should-insert-commas-after-expressions-before-whitespace/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
var x = /*#__PURE__*/_jsx("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-automatic/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-automatic/should-not-add-quotes-to-identifier-names/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
var e = /*#__PURE__*/_jsx(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-automatic/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-automatic/should-not-mangle-expressioncontainer-attribute-values/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("button", {
"data-value": "a value\n with\nnewlines\n and spaces",
children: "Button"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-not-strip-nbsp-even-coupled-with-other-whitespace/input.js | JavaScript | <div> </div>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-not-strip-nbsp-even-coupled-with-other-whitespace/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("div", {
children: " "
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-not-strip-tags-with-a-single-child-of-nbsp/input.js | JavaScript | <div> </div>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-not-strip-tags-with-a-single-child-of-nbsp/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("div", {
children: " "
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-properly-handle-comments-between-props/input.js | JavaScript | var x = (
<div
/* a multi-line
comment */
attr1="foo"
>
<span // a double-slash comment
attr2="bar"
/>
</div>
);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-properly-handle-comments-between-props/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
var x = /*#__PURE__*/ _jsx("div", {
/* a multi-line
comment */ attr1: "foo",
children: /*#__PURE__*/ _jsx("span" // a double-slash comment
, {
attr2: "bar"
})
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-properly-handle-keys/input.js | JavaScript | var x = (
<div>
<div key="1" />
<div key="2" meow="wolf" />
<div key="3" />
</div>
);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-properly-handle-keys/output.mjs | JavaScript | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var x = /*#__PURE__*/_jsxs("div", {
children: [/*#__PURE__*/_jsx("div", {}, "1"), /*#__PURE__*/_jsx("div", {
meow: "wolf"
}, "2"), /*#__PURE__*/_jsx("div", {}, "3")]
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-properly-handle-null-prop-spread/input.js | JavaScript | var foo = null;
var x = <div {...foo} />;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-properly-handle-null-prop-spread/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
var foo = null;
var x = /*#__PURE__*/_jsx("div", { ...foo
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-quote-jsx-attributes/input.js | JavaScript | <button data-value="a value">Button</button>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-quote-jsx-attributes/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("button", {
"data-value": "a value",
children: "Button"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-support-xml-namespaces-if-flag/input.js | JavaScript | <f:image n:attr />;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-support-xml-namespaces-if-flag/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("f:image", {
"n:attr": true
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-throw-error-namespaces-if-not-flag/input.js | JavaScript | <f:image />;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-throw-error-namespaces-if-not-flag/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("f:image", {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-transform-known-hyphenated-tags/input.js | JavaScript | <font-face />;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-transform-known-hyphenated-tags/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx("font-face", {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-use-createElement-when-key-comes-after-spread/input.js | JavaScript | var x = <div {...props} key="1" foo="bar" />;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-use-createElement-when-key-comes-after-spread/output.mjs | JavaScript | import { createElement as _createElement } from "react";
var x = /*#__PURE__*/_createElement("div", { ...props,
key: "1",
foo: "bar"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-use-jsx-when-key-comes-before-spread/input.js | JavaScript | var x = <div key="1" {...props} foo="bar" />;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/should-use-jsx-when-key-comes-before-spread/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
var x = /*#__PURE__*/_jsx("div", { ...props,
foo: "bar"
}, "1");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/this-tag-name/input.js | JavaScript | var div = <this.foo>test</this.foo>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/this-tag-name/output.mjs | JavaScript | import { jsx as _jsx } from "react/jsx-runtime";
var div = /*#__PURE__*/_jsx(this.foo, {
children: "test"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/weird-symbols/input.js | JavaScript | class MobileHomeActivityTaskPriorityIcon extends React.PureComponent {
render() {
return <Text> {this.props.value} </Text>;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_react/tests/jsx/fixture/react-automatic/weird-symbols/output.mjs | JavaScript | import { jsxs as _jsxs } from "react/jsx-runtime";
class MobileHomeActivityTaskPriorityIcon extends React.PureComponent {
render() {
return /*#__PURE__*/ _jsxs(Text, {
children: [
" ",
this.props.value,
" "
]
});
}
}
| 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-last-spread-attributes/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-automatic/wraps-props-in-react-spread-for-last-spread-attributes/output.mjs | JavaScript | /*#__PURE__*/ import { jsx as _jsx } from "react/jsx-runtime";
_jsx(Component, {
y: 2,
z: true,
...x
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.