https://github.com/madvas/js-to-edn
Simple command line utility to convert Javascript data structure (map or array) or JSON to formatted EDN.
https://github.com/madvas/js-to-edn
Last synced: 3 months ago
JSON representation
Simple command line utility to convert Javascript data structure (map or array) or JSON to formatted EDN.
- Host: GitHub
- URL: https://github.com/madvas/js-to-edn
- Owner: madvas
- Created: 2016-05-06T08:38:14.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-08T06:27:42.000Z (about 9 years ago)
- Last Synced: 2025-02-04T12:24:08.548Z (4 months ago)
- Language: Clojure
- Homepage:
- Size: 85.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# js-to-edn
Simple command line utility to convert Javascript data structure (map or array) or JSON to pretty EDN.
Useful when copying pasting JS snippets from web.## Usage
```
lein cljsbuild oncenode release/js_to_edn.js "{container: { flex: 1, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF'}} "{container: { flex: 1, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF'}}"
{:container
{:flex 1,
:flexDirection "row",
:justifyContent "center",
:alignItems "center",
:backgroundColor "#F5FCFF"}}
node release/js_to_edn.js "something : {something: 'else'}"{:something {:something "else"}}
```
## License
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.