Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 825 Bytes

MIGRATION.md

File metadata and controls

47 lines (38 loc) · 825 Bytes

Migration

This document contains information about how to smoothly migrate the things from a version to another version.

0.1.1 to 1.0.0

Usage

Now in this version, we can to create custom instances based in Psmitter class.

Before

<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)

After

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)