فهرست منبع

apikey -> key

Michelle Bu 12 سال پیش
والد
کامیت
b633066161
4فایلهای تغییر یافته به همراه9 افزوده شده و 9 حذف شده
  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);
   });

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 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);
   });

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است