From 51994e73cf01c6017349e3fa73a4c8431c55833c Mon Sep 17 00:00:00 2001 From: Amila Welihinda Date: Sat, 26 Nov 2016 09:33:10 -0800 Subject: [PATCH] Updated readme example to es6 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 40a203b..88e5ef4 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ This is useful for: ## Example Usage ``` js -var pty = require('pty.js'); +const pty = require('pty.js'); -var term = pty.spawn('bash', [], { +const term = pty.spawn('bash', [], { name: 'xterm-color', cols: 80, rows: 30, @@ -23,7 +23,7 @@ var term = pty.spawn('bash', [], { env: process.env }); -term.on('data', function(data) { +term.on('data', (data) => { console.log(data); });