Skip to content

Commit 44ec3b7

Browse files
committed
Added reference to hertzy for browsers.
1 parent 7596161 commit 44ec3b7

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

README.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<br/>
88

99
<div align="center">
10-
10+
1111
[![Build Status](https://travis-ci.org/NickNaso/hertzy.svg?branch=master)](https://travis-ci.org/NickNaso/hertzy)
1212
[![Build status](https://ci.appveyor.com/api/projects/status/twdommvefkpw70dp/branch/master?svg=true)](https://ci.appveyor.com/project/NickNaso/hertzy/branch/master)
1313
[![NPM version](https://img.shields.io/npm/v/hertzy.svg?style=flat)](https://www.npmjs.com/package/hertzy)
@@ -21,6 +21,7 @@
2121
* [Motivations](#motivations)
2222
* [Installation](#install)
2323
* [Usage](#usage)
24+
* [Hertzy for browsers](#hertzy_for_browsers)
2425
* [API documentation](#api)
2526
* [Code of conduct](CODE_OF_CONDUCT.md)
2627
* [Team](#team)
@@ -114,7 +115,6 @@ need to obtain a frequency or create a new one. A **frequency** object is a
114115
channel where you can emit or listen for an event issued by other modules.
115116

116117
```js
117-
118118
'use strict'
119119

120120
const Hertzy = require('hertzy')
@@ -135,26 +135,29 @@ usr.emit('user:add', {
135135
password: '********',
136136
137137
})
138-
139138
```
140139

140+
<a name="hertzy_for_browsers"></a>
141+
142+
## Hertzy for browsers
143+
144+
To use Hertzy in the browser, please refer to this specific [version](https://github.com/NickNaso/hertzy/tree/browser).
145+
141146
<a name="api"></a>
142147

143148
## API
144149

145-
## VERSION
150+
### VERSION
146151

147152
This is a String property that represents the version of **hertzy**
148153

149154
```js
150-
151155
'use strict'
152156

153157
const Hertzy = require('hertzy')
154158

155159
// Get hertzy version and print it
156160
console.log(Hertzy.VERSION)
157-
158161
```
159162

160163
### WARNING
@@ -168,15 +171,13 @@ hertzy, the number of max listeners will be dynamically updated based on your
168171
usage.
169172

170173
```js
171-
172174
'use strict'
173175

174176
const Hertzy = require('hertzy')
175177

176178
// Set hertzy warning value
177179
// Get hertzy warning value and print it
178180
console.log(Hertzy.WARNING = true)
179-
180181
```
181182

182183
### tune (frequency)
@@ -188,14 +189,12 @@ parameter **frequency** is a valid String and creates or returns an instance of
188189
methods.
189190

190191
```js
191-
192192
'use strict'
193193

194194
const Hertzy = require('hertzy')
195195

196196
// Get frequency to use
197197
const frequency = Hertzy.tune('user')
198-
199198
```
200199

201200
#### How to use **Frequency**
@@ -209,7 +208,6 @@ object.
209208
The **fq** method returns the string representing the frequency's name
210209

211210
```js
212-
213211
'use strict'
214212

215213
const Hertzy = require('hertzy')
@@ -219,7 +217,6 @@ const frequency = Hertzy.tune('user')
219217

220218
console.log(frequency.fq())
221219
// It prints the String 'user'
222-
223220
```
224221

225222
#### emit(evt, [, ...args])
@@ -231,7 +228,6 @@ passed to the listeners of the specified event.
231228
Remember, **evt** needs to be a valid String otherwise you will get an error.
232229

233230
```js
234-
235231
'use strict'
236232

237233
const Hertzy = require('hertzy')
@@ -245,7 +241,6 @@ frequency.emit('user:add', {
245241
password: '********',
246242
247243
})
248-
249244
```
250245

251246
#### on (evt, fn)
@@ -258,7 +253,6 @@ Remember, **evt** and **fn** need to be a valid String and Function
258253
respectively, otherwise you will get an error.
259254

260255
```js
261-
262256
'use strict'
263257

264258
const Hertzy = require('hertzy')
@@ -270,7 +264,6 @@ const frequency = Hertzy.tune('user')
270264
frequency.on('user:add', function (data) {
271265
// DO SOMETHING ...
272266
})
273-
274267
```
275268

276269
#### off (evt, fn)
@@ -283,7 +276,6 @@ Remember, **evt** and **fn** need to be a valid String and Function
283276
respectively, otherwise you will get an error.
284277

285278
```js
286-
287279
'use strict'
288280

289281
const Hertzy = require('hertzy')
@@ -300,8 +292,8 @@ frequency.on('user:add', handler)
300292

301293
// Remove listener for 'user:add' event on 'user' frequency
302294
frequency.off('user:add', handler)
303-
304295
```
296+
305297
<a name="references_and_articles"></a>
306298

307299
## Rererences and articles

0 commit comments

Comments
 (0)