That's a great question. Since Asciidoctor.js is actually a lot of different environments, we've decided to take a more specific approach. First, you can check for Asciidoctor.js in general by checking for the platform-opal attribute. To check if it's also running in the browser, you can check for env-browser.
At the moment, these attributes are set by the plugins that integrate Asciidoctor.js, though we should definitely consider promoting the general ones to the Asciidoctor.js build.
Since we use the term "platform" in Asciidoctor.js to distinguish the JavaScript runtime, I'm thinking perhaps we may want to rethink the name platform-opal and perhaps call it runtime-opal instead.
As another option, I think we should define the asciidoctorjs-version (or asciidoctor-js-version) attribute similar to how we define asciidoctor-version.
-Dan