We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31259d4 commit 71160cdCopy full SHA for 71160cd
IdrisScript/Functions.idr
@@ -62,3 +62,9 @@ hasOwnProperty prop fun = do
62
||| Returns the name of a function.
63
name : JSValue JSFunction -> IO String
64
name fun = mkForeign (FFun "%0.name" [FPtr] FString) (unpack fun)
65
+
66
+||| Returns the constructor of a function.
67
+constructor : JSValue JSFunction -> IO (JSValue JSFunction)
68
+constructor fun = do
69
+ con <- mkForeign (FFun "%0.constructor" [FPtr] FPtr) (unpack fun)
70
+ return $ MkJSFunction con
0 commit comments