MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Clojure/comments/mlqgpc/clojurescript_110844_release/gtotrvs/?context=3
r/Clojure • u/tekacs • Apr 07 '21
2 comments sorted by
View all comments
2
Would this be an example of exporting a javascript object as a library?
MyModule.js
var MyObject = function() { // This is private because it is not being return var _privateFunction = function(param1, param2) { ... return; } var function1 = function(param1, callback) { ... callback(err, results); } var function2 = function(param1, param2, callback) { ... callback(err, results); } return { function1: function1 ,function2: function2 } }(); module.exports = MyObject;
In which case we would have the following cljs?
(ns foo (:require [myModule$MyObject :as sub-lib :refer [...]]))
2
u/TheLastSock Apr 07 '21
Would this be an example of exporting a javascript object as a library?
MyModule.js
In which case we would have the following cljs?