Przeglądaj źródła

syntax highlighting

Michelle Bu 12 lat temu
rodzic
commit
4723e4581b
2 zmienionych plików z 21 dodań i 17 usunięć
  1. 20 16
      README.md
  2. 1 1
      deps/EventEmitter

+ 20 - 16
README.md

@@ -12,25 +12,29 @@ Each peer simply provides a identifier with which other peers using the same API
 
 
 **Peer**
 **Peer**
 
 
-     <script>
-       var peer = new Peer('someid', {key: 'apikey'});
-       peer.on('connection', function(conn) {
-         conn.on('data', function(data){
-           // Will print 'hi!'
-           console.log(data);
-         });
-       });
-     </script>
+```js
+<script>
+  var peer = new Peer('someid', {key: 'apikey'});
+  peer.on('connection', function(conn) {
+    conn.on('data', function(data){
+      // Will print 'hi!'
+      console.log(data);
+    });
+  });
+</script>
+```
 
 
 **Connecting peer**
 **Connecting peer**
 
 
-     <script>
-       var peer = new Peer('anotherid', {key: 'apikey'});
-       var conn = peer.connect('someid');
-       conn.on('open', function(){
-         conn.send('hi!');
-       }); 
-     </script>
+```js
+<script>
+  var peer = new Peer('anotherid', {key: 'apikey'});
+  var conn = peer.connect('someid');
+  conn.on('open', function(){
+    conn.send('hi!');
+  }); 
+</script>
+```
 
 
 
 
 ### [Getting started](http://peerjs.com/start)
 ### [Getting started](http://peerjs.com/start)

+ 1 - 1
deps/EventEmitter

@@ -1 +1 @@
-Subproject commit 5c347bfe5cb8ec62ea2872348ab9304ba0c585f8
+Subproject commit 7e4606d166e1a587263a022b388e1232f42cd7d4