https://github.com/anko/eslisp-camelify
eslisp macro: this-is-a-variable → thisIsAVariable
https://github.com/anko/eslisp-camelify
Last synced: 3 months ago
JSON representation
eslisp macro: this-is-a-variable → thisIsAVariable
- Host: GitHub
- URL: https://github.com/anko/eslisp-camelify
- Owner: anko
- Created: 2015-09-15T22:45:33.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-05T15:28:06.000Z (about 9 years ago)
- Last Synced: 2025-03-08T15:48:43.733Z (over 1 year ago)
- Language: Makefile
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# eslisp-camelify [][1] [][2] [][3]
An [eslisp][4] macro that rewrites all atoms in its arguments from
`dash-separated` to `camelCase`, but otherwise touches nothing.
Handy if you prefer lisp-like `dash-separated-variables`.
## Example
(macro camelify (require "eslisp-camelify"))
(camelify
(explain-that (the-answer-is 42)))
↓
explainThat(theAnswerIs(42));
It probably makes good sense to use this as a [transform macro][5] to wrap your
whole program though:
eslc -t eslisp-camelify < input.esl > output.js
See [the tests][6] for fuller usage.
## License
[ISC][7].
[1]: https://www.npmjs.com/package/eslisp-camelify
[2]: https://travis-ci.org/anko/eslisp-camelify
[3]: https://gitter.im/anko/eslisp
[4]: https://github.com/anko/eslisp
[5]: https://github.com/anko/eslisp/blob/master/doc/how-macros-work.markdown#transform-macros
[6]: test.esl
[7]: http://opensource.org/licenses/ISC