aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rx.ts32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/rx.ts b/src/rx.ts
index 5af56d5..2ff8889 100644
--- a/src/rx.ts
+++ b/src/rx.ts
@@ -413,7 +413,7 @@ function rxRun<A>(
}
function isRx<A>(x: any): x is Rx<A> {
- return x != null && x.type !== undefined && (x.type === "Var" || x.type === "Map" || x.type === "FlatMap" || x.type === 'Sequence' || x.type === 'Pure')
+ return x != null && x.type !== undefined && (x.type === 'Var' || x.type === 'Map' || x.type === 'FlatMap' || x.type === 'Sequence' || x.type === 'Pure')
}
function isPure<A>(x: any): x is Pure<A> {
@@ -421,19 +421,19 @@ function isPure<A>(x: any): x is Pure<A> {
}
function isVar<A>(x: any): x is Var<A> {
- return x.type === "Var"
+ return x.type === 'Var'
}
function isMap<A, B>(x: any): x is Map<A, B> {
- return x.type === "Map"
+ return x.type === 'Map'
}
function isFlatMap<A, B>(x: any): x is FlatMap<A, B> {
- return x.type === "FlatMap"
+ return x.type === 'FlatMap'
}
function isSequence<A>(x: any): x is Sequence<A> {
- return x.type === "Sequence"
+ return x.type === 'Sequence'
}
// Append
@@ -459,7 +459,7 @@ function appendChild(state: State, element: Element, child: Html, lastAdded?: No
remove: () => removes.forEach((o) => o()),
lastAdded
}
- } else if (typeof child == "string") {
+ } else if (typeof child == 'string') {
const node = document.createTextNode(child)
appendNode(element, node, lastAdded)
return {
@@ -467,7 +467,7 @@ function appendChild(state: State, element: Element, child: Html, lastAdded?: No
remove: () => element.removeChild(node),
lastAdded: node
}
- } else if (typeof child == "number") {
+ } else if (typeof child == 'number') {
return appendChild(state, element, child.toString(), lastAdded)
} else if (isTag(child)) {
const { tagName, attributes, children, onmount, onunmount } = child
@@ -665,31 +665,31 @@ function isSvg(tagName: string): boolean {
}
function isTag<A>(x: any): x is Tag {
- return x != null && x.type === "Tag"
+ return x != null && x.type === 'Tag'
}
function isWithState<A>(x: any): x is WithState<A> {
- return x != null && x.type === "WithState"
+ return x != null && x.type === 'WithState'
}
function isWithState2<A, B>(x: any): x is WithState2<A, B> {
- return x != null && x.type === "WithState2"
+ return x != null && x.type === 'WithState2'
}
function isWithState3<A, B, C>(x: any): x is WithState3<A, B, C> {
- return x != null && x.type === "WithState3"
+ return x != null && x.type === 'WithState3'
}
function isWithState4<A, B, C, D>(x: any): x is WithState4<A, B, C, D> {
- return x != null && x.type === "WithState4"
+ return x != null && x.type === 'WithState4'
}
function isWithState5<A, B, C, D, E>(x: any): x is WithState5<A, B, C, D, E> {
- return x != null && x.type === "WithState5"
+ return x != null && x.type === 'WithState5'
}
function isWithState6<A, B, C, D, E, F>(x: any): x is WithState6<A, B, C, D, E, F> {
- return x != null && x.type === "WithState6"
+ return x != null && x.type === 'WithState6'
}
function appendNode(base: Element, node: Node, lastAdded?: Node) {
@@ -708,9 +708,9 @@ function setAttribute(setAttr: (key: any, value: any) => void, element: Element,
} else if (attribute === false) {
// @ts-ignore
if (key in element) setAttr(key, false)
- } else if (typeof attribute === "number") {
+ } else if (typeof attribute === 'number') {
setAttr(key, attribute.toString())
- } else if (typeof attribute === "string") {
+ } else if (typeof attribute === 'string') {
setAttr(key, attribute)
} else {
// @ts-ignore