Acorn preloaded with plugins for syntax parity with recent Node versions.
It also includes versions of the plugins compiled with Bublé, so they can be run on old Node versions (0.6 and up).
npm install acorn-node
var acorn =
The API is the same as acorn, but the following syntax features are enabled by default:
- Bigint syntax (via acorn-bigint)
import.metaproperty (via acorn-import-meta)
And the following options have different defaults from acorn, to match Node modules:
var walk =
The Acorn syntax tree walker. Comes preconfigured for the syntax plugins if necessary. See the acorn documentation for details.