boa

JavaScript engine written in Rust for embedding in applications.

brewmacoslinux
Try with needOr install directly
Source

About

Embeddable and experimental Javascript engine written in Rust

Commands

boa

Examples

run a JavaScript file$ boa script.js
execute JavaScript code from command line$ boa -c "console.log('Hello, World!')"
start interactive JavaScript shell$ boa
evaluate JavaScript expression$ boa -c "2 + 2"
test JavaScript code snippets quickly$ boa -c "const arr = [1, 2, 3]; console.log(arr.map(x => x * 2))"