[Pkg-javascript-commits] [jquery-minicolors] 16/46: Single quotes for consistency

David Prévot taffit at moszumanska.debian.org
Sun Oct 25 17:18:25 UTC 2015


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

taffit pushed a commit to branch master
in repository jquery-minicolors.

commit 894d3f0232ad1d4a4feb710276fda26b9562dfcf
Author: Cory LaViska <cory at abeautifulsite.net>
Date:   Thu Sep 17 15:03:43 2015 -0400

    Single quotes for consistency
---
 jquery.minicolors.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/jquery.minicolors.js b/jquery.minicolors.js
index 694e5be..efed2bf 100644
--- a/jquery.minicolors.js
+++ b/jquery.minicolors.js
@@ -741,8 +741,8 @@
 
     // Parses a string and returns a valid RGB(A) string when possible
     function parseRgb(string) {
-        values = string.replace(/[^\d,.]/g, "");
-        rgba = values.split(",");
+        values = string.replace(/[^\d,.]/g, '');
+        rgba = values.split(',');
         if( rgba[3] && rgba[3] < 1 ) {
             output = 'rgba(' + keepWithin(rgba[0], 0, 255) +
                 ', ' + keepWithin(rgba[1], 0, 255) +
@@ -816,10 +816,10 @@
     // Converts an RGB string to a hex string
     function rgbString2hex(rgb){
         rgb = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
-        return (rgb && rgb.length === 4) ? "#" +
-        ("0" + parseInt(rgb[1],10).toString(16)).slice(-2) +
-        ("0" + parseInt(rgb[2],10).toString(16)).slice(-2) +
-        ("0" + parseInt(rgb[3],10).toString(16)).slice(-2) : '';
+        return (rgb && rgb.length === 4) ? '#' +
+        ('0' + parseInt(rgb[1],10).toString(16)).slice(-2) +
+        ('0' + parseInt(rgb[2],10).toString(16)).slice(-2) +
+        ('0' + parseInt(rgb[3],10).toString(16)).slice(-2) : '';
     }
 
     // Converts an RGB object to a hex string

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



More information about the Pkg-javascript-commits mailing list