Skip to content

Commit cf176c7

Browse files
authored
Removed outdated var declarations from README.md
1 parent 63e02dc commit cf176c7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ npm install easymidi
1212
The module can interface with existing MIDI inputs/outputs or create virtual inputs/outputs. Here's a simple example to listen for note on events from an existing MIDI input:
1313

1414
```javascript
15-
var easymidi = require('easymidi');
16-
var input = new easymidi.Input('MIDI Input Name');
15+
const easymidi = require('easymidi');
16+
const input = new easymidi.Input('MIDI Input Name');
1717
input.on('noteon', function (msg) {
1818
// do something with msg
1919
});
@@ -22,8 +22,8 @@ input.on('noteon', function (msg) {
2222
Here's an example of sending a note on message to an existing MIDI output:
2323

2424
```javascript
25-
var easymidi = require('easymidi');
26-
var output = new easymidi.Output('MIDI Output Name');
25+
const easymidi = require('easymidi');
26+
const output = new easymidi.Output('MIDI Output Name');
2727
output.send('noteon', {
2828
note: 64,
2929
velocity: 127,
@@ -37,26 +37,26 @@ The Input and Output objects are [EventEmitters](http://nodejs.org/api/events.ht
3737
Virtual devices can be created by passing a `true` argument to the Input or Output constructors:
3838

3939
```javascript
40-
var virtualInput = new easymidi.Input('Virtual input name', true);
41-
var virtualOutput = new easymidi.Output('Virtual output name', true);
40+
const virtualInput = new easymidi.Input('Virtual input name', true);
41+
const virtualOutput = new easymidi.Output('Virtual output name', true);
4242
```
4343

4444
# Device Lists
4545
You can get an array of existing MIDI input or output names using the `getInputs()` and `getOutputs` functions:
4646

4747
```javascript
48-
var inputs = easymidi.getInputs();
49-
var outputs = easymidi.getOutputs();
48+
const inputs = easymidi.getInputs();
49+
const outputs = easymidi.getOutputs();
5050
```
5151

5252
# Closing Devices
5353
When you're finished with a MIDI device you can `close()` it:
5454

5555
```javascript
56-
var input = new easymidi.Input('My input', true);
56+
const input = new easymidi.Input('My input', true);
5757
input.close();
5858

59-
var output = new easymidi.Output('My output', true);
59+
const output = new easymidi.Output('My output', true);
6060
output.close();
6161
```
6262

0 commit comments

Comments
 (0)