Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e19788a

Browse files
committed
Remove is* helpers
It’s better to use guard/if-let instead.
1 parent d0da61a commit e19788a

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

Sources/JavaScriptKit/JSValue.swift

-25
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,6 @@ public enum JSValue: Equatable {
5555
}
5656
}
5757

58-
public var isBoolean: Bool {
59-
guard case .boolean = self else { return false }
60-
return true
61-
}
62-
63-
public var isString: Bool {
64-
guard case .string = self else { return false }
65-
return true
66-
}
67-
68-
public var isNumber: Bool {
69-
guard case .number = self else { return false }
70-
return true
71-
}
72-
73-
public var isObject: Bool {
74-
guard case .object = self else { return false }
75-
return true
76-
}
77-
78-
public var isFunction: Bool {
79-
guard case .function = self else { return false }
80-
return true
81-
}
82-
8358
/// Returns the `true` if this JS value is null.
8459
/// If not, returns `false`.
8560
public var isNull: Bool {

0 commit comments

Comments
 (0)