This document contains information about how to smoothly migrate the things from a version to another version.
Now in this version, we can to create custom instances based in Psmitter class.
<script src="psmiter.min.js" type="text/javascript"></script>
or
var vendors = [
...,
'psmitter'
]
or in requireJs
require('psmitter', function (Psmitter) {
return Psmitter
})
The Psmitter instance was used directly
Psmitter.on('hello', console.log)
with vendors
or <script>
tag
let myEmitter = new Psmitter()
myEmitter.on('hello', console.log)
with requirejs
const Psmitter = require('psmitter').Psmitter
let myEmitter = new Psmitter()
myEmitter.on('hello', console.log)