Bläddra i källkod

apikey -> key

Michelle Bu 12 år sedan
förälder
incheckning
b633066161
4 ändrade filer med 9 tillägg och 9 borttagningar
  1. 3 3
      demo/static/peer.js
  2. 3 3
      dist/peer.js
  3. 0 0
      dist/peer.min.js
  4. 3 3
      lib/peer.js

+ 3 - 3
demo/static/peer.js

@@ -858,12 +858,12 @@ function Peer(options) {
   // Ensure alphanumeric_-
   if (options.id && !/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.exec(options.id))
     throw new Error('Peer ID can only contain alphanumerics, "_", and "-".');
-  if (options.apikey && !/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.exec(options.apikey))
+  if (options.key && !/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.exec(options.key))
     throw new Error('API key can only contain alphanumerics, "_", and "-".');
 
   this._id = options.id;
   // Not used unless using cloud server.
-  this._apikey = options.apikey;
+  this._key = options.key;
 
   this._startSocket();
 
@@ -878,7 +878,7 @@ util.inherits(Peer, EventEmitter);
 
 Peer.prototype._startSocket = function() {
   var self = this;
-  this._socket = new Socket(this._server, this._id, this._apikey);
+  this._socket = new Socket(this._server, this._id, this._key);
   this._socket.on('message', function(data) {
     self._handleServerJSONMessage(data);
   });

+ 3 - 3
dist/peer.js

@@ -858,12 +858,12 @@ function Peer(options) {
   // Ensure alphanumeric_-
   if (options.id && !/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.exec(options.id))
     throw new Error('Peer ID can only contain alphanumerics, "_", and "-".');
-  if (options.apikey && !/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.exec(options.apikey))
+  if (options.key && !/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.exec(options.key))
     throw new Error('API key can only contain alphanumerics, "_", and "-".');
 
   this._id = options.id;
   // Not used unless using cloud server.
-  this._apikey = options.apikey;
+  this._key = options.key;
 
   this._startSocket();
 
@@ -878,7 +878,7 @@ util.inherits(Peer, EventEmitter);
 
 Peer.prototype._startSocket = function() {
   var self = this;
-  this._socket = new Socket(this._server, this._id, this._apikey);
+  this._socket = new Socket(this._server, this._id, this._key);
   this._socket.on('message', function(data) {
     self._handleServerJSONMessage(data);
   });

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/peer.min.js


+ 3 - 3
lib/peer.js

@@ -19,12 +19,12 @@ function Peer(options) {
   // Ensure alphanumeric_-
   if (options.id && !/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.exec(options.id))
     throw new Error('Peer ID can only contain alphanumerics, "_", and "-".');
-  if (options.apikey && !/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.exec(options.apikey))
+  if (options.key && !/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.exec(options.key))
     throw new Error('API key can only contain alphanumerics, "_", and "-".');
 
   this._id = options.id;
   // Not used unless using cloud server.
-  this._apikey = options.apikey;
+  this._key = options.key;
 
   this._startSocket();
 
@@ -39,7 +39,7 @@ util.inherits(Peer, EventEmitter);
 
 Peer.prototype._startSocket = function() {
   var self = this;
-  this._socket = new Socket(this._server, this._id, this._apikey);
+  this._socket = new Socket(this._server, this._id, this._key);
   this._socket.on('message', function(data) {
     self._handleServerJSONMessage(data);
   });

Vissa filer visades inte eftersom för många filer har ändrats