[Pkg-javascript-commits] [sockjs-client] 206/434: Cosmetic

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit 5cb07c2884d70c847fff910696d2fbe48b408b63
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Fri Nov 25 13:28:39 2011 +0000

    Cosmetic
---
 lib/utils.js                    | 3 +--
 tests/html/src/unittests.coffee | 5 +++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/utils.js b/lib/utils.js
index 28bd175..a1663cf 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -430,7 +430,7 @@ var unroll_meta = function(escapable) {
 utils.quote = function(string) {
     var quoted = JSONQuote(string);
 
-    // In most cases this is enough.
+    // In most cases this should be very fast and good enough.
     extra_escapable.lastIndex = 0;
     if(!extra_escapable.test(quoted)) {
         return quoted;
@@ -443,4 +443,3 @@ utils.quote = function(string) {
     });
 }
 
-
diff --git a/tests/html/src/unittests.coffee b/tests/html/src/unittests.coffee
index 147e0d4..8882f0d 100644
--- a/tests/html/src/unittests.coffee
+++ b/tests/html/src/unittests.coffee
@@ -60,8 +60,8 @@ test 'arrIndexOf', ->
     equal(u.arrIndexOf(a, 6), -1)
 
 test 'quote', ->
-    equal(u.quote(''), '""');
-    equal(u.quote('a'), '"a"');
+    equal(u.quote(''), '""')
+    equal(u.quote('a'), '"a"')
     equal(u.quote('\t'), '"\\t"')
     equal(u.quote('\n'), '"\\n"')
     equal(u.quote('\x00\udfff\ufffe\uffff'), '"\\u0000\\udfff\\ufffe\\uffff"')
@@ -74,3 +74,4 @@ test 'quote', ->
             String.fromCharCode(i)
     all_chars = c.join('')
     ok(JSON.parse(u.quote(all_chars)) is all_chars, "Quote/unquote all 64K chars.")
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list