An eslisp macro that rewrites its input forms' atoms that contain dots
into property accesses. This means you can write
x.y.1 instead of
(. x y 1), which compiles to JS as
Ignores trailing and leading dots, and atoms that consist of dots.
(macro propertify (require "/path/to/elisp-propertify/index.js")) (propertify (a.b 42))
See the tests for fuller usage.
It's totally reasonable to wrap your whole program in this. Consider the
If you need a computed member expression, you'll still need the
. macro: For
example, to get
a.b[b.length], you'll need to write
(. a.b b.length).