File tree Expand file tree Collapse file tree 2 files changed +17
-10
lines changed
Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 11441144 (let [default-type? (= type 'default)
11451145 nil-type? (nil? type)
11461146
1147- type-name (cond (= type 'default) '_
1148- (nil? type) ( symbol " nil " )
1147+ type-name (cond (nil? type) ( symbol " nil " )
1148+ (= type 'default) '_
11491149 (= type 'number) 'Number
11501150 (= type 'string) 'String
11511151 (= type 'boolean) 'Boolean
11521152 (= type 'vector) 'Array
11531153 (= type 'function) 'Function
1154+ (= type 're-pattern) 'RegExp
11541155 (= (namespace type) " js" ) type
11551156 :else nil )
11561157
Original file line number Diff line number Diff line change 7474(defn ^boolean satisfies?
7575 " Returns true if x satisfies the protocol"
7676 [protocol x]
77- (cond (identical? x nil )
78- (.-wisp_core$IProtocol$nil protocol)
79-
80- (identical? x null)
81- (.-wisp_core$IProtocol$nil protocol)
82-
83- :else (or (aget x (aget protocol 'wisp_core$IProtocol$id))
84- (.-wisp_core$IProtocol$_ protocol))))
77+ (or (.-wisp_core$IProtocol$_ protocol)
78+ (cond (identical? x nil )
79+ (or (.-wisp_core$IProtocol$nil protocol) false )
80+
81+ (identical? x null)
82+ (or (.-wisp_core$IProtocol$nil protocol) false )
83+
84+ :else (or (aget x (aget protocol 'wisp_core$IProtocol$id))
85+ (aget protocol
86+ (str " wisp_core$IProtocol$"
87+ (.replace (.replace (.call Object.prototype.toString x)
88+ " [object " " " )
89+ #"\] $" " " )))
90+ false ))))
8591
8692(defn ^boolean contains-vector?
8793 " Returns true if vector contains given element"
You can’t perform that action at this time.
0 commit comments