Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"import" like syntax for require? #7

Open
pesterhazy opened this issue May 29, 2016 · 0 comments
Open

"import" like syntax for require? #7

pesterhazy opened this issue May 29, 2016 · 0 comments

Comments

@pesterhazy
Copy link

Just thinking out loud. In JVM land we have :import.

(ns foo)

(def mom (js/require "moment"))

(defn main []
  (println "Today is" (-> (mom.) (.format "dddd"))))

Might be neat to allow

(ns foo
  (:require-node [moment :as mom]))

as a shorthand for

(ns foo)

(let [mom (js/require "moment")]
  ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant