Skip to content

Commit 1de03cb

Browse files
Refactoring tags.js
1 parent c168b2a commit 1de03cb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/core/componentBuilderHelper.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { capitalize, camelize } from "../util/string";
22
import { events, isReadOnlyEvent } from "./sortableEvents";
3-
4-
function isHtmlAttribute(value) {
5-
return ["id", "class"].includes(value) || value.startsWith("data-");
6-
}
3+
import { isHtmlAttribute } from "../util/tags";
74

85
function project(entries) {
96
return entries.reduce((res, [key, value]) => {

src/util/tags.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,8 @@ function isTransition(name) {
126126
return ["transition-group", "TransitionGroup"].includes(name);
127127
}
128128

129-
export { isHtmlTag, isTransition };
129+
function isHtmlAttribute(value) {
130+
return ["id", "class"].includes(value) || value.startsWith("data-");
131+
}
132+
133+
export { isHtmlTag, isHtmlAttribute, isTransition };

0 commit comments

Comments
 (0)