eslisp-camelify [][1] [][2] [][3]

September 23, 2015 Ā· View on GitHub

An eslisp 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 to wrap your whole program though:

eslc -t eslisp-camelify < input.esl > output.js

See the tests for fuller usage.

License

ISC.