diff options
author | Matěj Cepl <mcepl@redhat.com> | 2010-06-01 00:15:05 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2010-06-01 00:15:05 +0200 |
commit | 0aaaa4aca25a8842e92887fd15fa76ff8ed7923e (patch) | |
tree | c4869bdccb80fe24b5dafde5e1ea6801a4265c9b /lib/util.js | |
parent | 93570dc0f18dbe255cf453c947c5d521acae9c69 (diff) | |
download | bugzilla-triage-0aaaa4aca25a8842e92887fd15fa76ff8ed7923e.tar.gz |
Added another unit tests
- util.isInList
- util.getISODate
- util.valToArray
- util.getBugNo
Diffstat (limited to 'lib/util.js')
-rw-r--r-- | lib/util.js | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/util.js b/lib/util.js index c57cb1b..dbadef8 100644 --- a/lib/util.js +++ b/lib/util.js @@ -109,7 +109,7 @@ exports.addCSVValue = function addCSVValue(str, value) { exports.removeCSVValue = function removeCSVValue(str, value) { str = str.trim(); var parts = str ? str.split(/,\s*/) : []; - var valueArr = value instanceof Array ? value : value.split(",\s*"); + var valueArr = value instanceof Array ? value : value.split(/,\s*/); parts = parts.filter(function (e, i, a) { return (!isInList(e, valueArr)); }); @@ -117,18 +117,6 @@ exports.removeCSVValue = function removeCSVValue(str, value) { }; /** - * From given URL returns hostname of the server - * - * @param url String with the investigated URL - * @return String with hostname - * @depreceated - */ -exports.getHost = function getHost(url) { - var uri = urlMod.parse(url); - return uri.host; -}; - -/** * */ var getBugNo = exports.getBugNo = function getBugNo(url) { |