Observer is usable in both browser and server environments.

Embed as script

<script src=""></script>
// The above tag loads Observer into a global "WebNative" object.
const Observer = window.WebNative.Observer;

Install via npm

$ npm i -g npm
$ npm i --save @web-native-js/observer

Import with the import keyword:

// Node-style import
import Observer from '@web-native-js/observer';
// Standard JavaScript import. (Actual path depends on where you installed Observer to.)
import Observer from './node_modules/@web-native-js/observer/v1/src/index.js';