[Groonga-commit] groonga/express-kotoumi [master] Make createId as a private function

Zurück zum Archiv-Index

YUKI Hiroshi null+****@clear*****
Fri Dec 28 17:25:19 JST 2012


YUKI Hiroshi	2012-12-28 17:25:19 +0900 (Fri, 28 Dec 2012)

  New Revision: 1333669727396d5f9b3176dbfa1344006ac75956
  https://github.com/groonga/express-kotoumi/commit/1333669727396d5f9b3176dbfa1344006ac75956

  Log:
    Make createId as a private function

  Modified files:
    lib/backend-adaptor.js

  Modified: lib/backend-adaptor.js (+4 -4)
===================================================================
--- lib/backend-adaptor.js    2012-12-28 17:24:06 +0900 (9a20347)
+++ lib/backend-adaptor.js    2012-12-28 17:25:19 +0900 (cf5ed0c)
@@ -44,12 +44,12 @@ Connection.prototype._handleResult = function(data) {
     }
 };
 
-Connection.prototype._createId = function() {
-    return Date.now() + ':' + Math.round(Math.random() * 65536);
-};
+function createId() {
+  return Date.now() + ':' + Math.round(Math.random() * 65536);
+}
 
 Connection.prototype.emitMessage = function(message, callback) {
-    var id = this._createId();
+    var id = createId();
     var message = {
       requestid: id,
       command:   'search',
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index