Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roman01la/javascript-to-clojurescript
JavaScript to ClojureScript translator
https://github.com/roman01la/javascript-to-clojurescript
clojure clojurescript cross-compiler transpiler
Last synced: 3 months ago
JSON representation
JavaScript to ClojureScript translator
- Host: GitHub
- URL: https://github.com/roman01la/javascript-to-clojurescript
- Owner: roman01la
- Created: 2018-06-18T20:05:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T02:19:37.000Z (over 1 year ago)
- Last Synced: 2024-05-02T04:40:39.813Z (9 months ago)
- Topics: clojure, clojurescript, cross-compiler, transpiler
- Language: JavaScript
- Homepage: https://roman01la.github.io/javascript-to-clojurescript/
- Size: 3.09 MB
- Stars: 101
- Watchers: 6
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
_If you like what I do, consider supporting my work via donation_
[![](https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg)](https://www.buymeacoffee.com/romanliutikov)
# JavaScript to ClojureScript translator
This tool tries to translate as much JavaScript code into ClojureScript as it can. Keep in mind that it might fail or the result will be non-idiomatic Clojure code due to substantial differences between languages.
_e.g. Clojure explicitly distincts global and local vars, but JavaScript does not_
```clojure
(def x 1) ;; global
(let [x 2] ;; local
(/ x 2))
```_Clojure's data structures are immutable by defalt_
```clojure
(let [x {}]
[(assoc x :y 1) x])
;; [{:y 1} {}]
```Use for educational purpose.
## How to contribute
If something is not translated properly, file an issue