Skip to content

Commit e14dfbe

Browse files
committed
Merge branch 'main' of github.com:Maksims/mr-EventEmitter into main
2 parents d6415ff + 5014fc2 commit e14dfbe

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# mr-EventEmitter
22

33
Provides ability to subscribe and emit events. This event emitter is tailored for real-time applications so is designed with performance and memory efficiency in mind.
4-
Also it has two build targets: ES5 (ECMA2009) and ES8+ (modern JS), to maximize [browser support](#Browser) without sacraficing benefits of modern JS for majority of users.
4+
Also it has two build targets: ES5 (ECMA2009) and ES8+ (modern JS), to maximize [browser support](#Browser) without sacrificing benefits of modern JS for majority of users.
55

66
[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](LICENSE)
77

@@ -27,7 +27,16 @@ const EventEmitter = require('mr-eventemitter');
2727
<script type='module' src='mr-eventemitter.min.js'></script>
2828
<script nomodule src='mr-eventemitter.es5.min.js'></script>
2929
```
30-
Use built files from `dist` directory for browser. It will load ES8+ version if it is supported ([~94%](https://caniuse.com/?search=ES8)), otherwise it will load ES5 (ECMA2009) version that supports pretty much [every](https://caniuse.com/?search=ES5) platform.
30+
Use built files from a `dist` directory for the browser. It will load ES8+ version if it is supported ([~94%](https://caniuse.com/?search=ES8)), otherwise it will load ES5 (ECMA2009) version that supports pretty much [every](https://caniuse.com/?search=ES5) platform.
31+
32+
#### CDN ([jsDelivr](https://www.jsdelivr.com/))
33+
34+
You can use a public CDN for the library:
35+
36+
ES8+ module: https://cdn.jsdelivr.net/npm/mr-eventemitter@0.1/dist/mr-eventemitter.min.js
37+
ES5 version: https://cdn.jsdelivr.net/npm/mr-eventemitter@0.1/dist/mr-eventemitter.es5.min.js
38+
39+
#### Example
3140

3241
```js
3342
let obj = new EventEmitter();
@@ -154,7 +163,7 @@ evt.off();
154163

155164
## Building
156165

157-
Builds single file into two ES5 and ES8+ versions using Babel and Terser.
166+
Builds a single file into two ES5 and ES8+ versions using Babel and Terser.
158167
Source file: `src/index.js`
159168
Built versions ES5 (`dist/mr-eventemitter.es5.min.js`) and ES8+ (`dist/mr-eventemitter.min.js`):
160169

0 commit comments

Comments
 (0)