Skip to content
Browse files

made require nicer

  • Loading branch information...
1 parent 59d02e3 commit 2c5caaf5c9a904f1fc66be60b563e6ae7487b31b @jamescarr committed Sep 18, 2010
Showing with 7 additions and 6 deletions.
  1. +2 −1 snippets/javascript/req.snippet
  2. +5 −5 snippets/javascript/websocket.snippet
View
3 snippets/javascript/req.snippet
@@ -1 +1,2 @@
-var ${1:module} = require ('${2:module}')
+var $1 = require ('${1:sys}')
+
View
10 snippets/javascript/websocket.snippet
@@ -1,10 +1,10 @@
-var socket = ${1:io}.listen(${2:app});
+var ${1:socket} = ${2:io}.listen(${3:app});
-socket.on('connection', function(client){
- client.on('message', function(${3:msg}){
- ${4:}
+$1.on('connection', function(client){
+ client.on('message', function(${4:msg}){
+ ${5:}
});
client.on('disconnect', function(){
- ${5:}
+ ${6:}
});
});

0 comments on commit 2c5caaf

Please sign in to comment.
Something went wrong with that request. Please try again.