Skip to content

Commit 5ea712f

Browse files
committed
utils: remove isString
1 parent dea8eed commit 5ea712f

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

lib/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ client.prototype.handleMessage = function handleMessage(message) {
115115
if(typeof value === 'boolean') { value = null; }
116116
else if(value === "1") { value = true; }
117117
else if(value === "0") { value = false; }
118-
else if(_.isString(value)) { value = _.unescapeIRC(value); }
118+
else if(typeof value === 'string') { value = _.unescapeIRC(value); }
119119
tags[key] = value;
120120
}
121121

lib/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function parseComplexTag(tags, tagKey, splA = ",", splB = "/", splC) {
3232
return tags;
3333
}
3434

35-
var tagIsString = _.isString(raw);
35+
var tagIsString = typeof raw === 'string';
3636
tags[tagKey + "-raw"] = tagIsString ? raw : null;
3737

3838
if(raw === true) {

lib/utils.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ var self = module.exports = {
2020
// Value is a regex..
2121
isRegex: str => /[\|\\\^\$\*\+\?\:\#]/.test(str),
2222

23-
// Value is a string..
24-
isString: str => typeof(str) === "string",
25-
2623
// Value is a valid url..
2724
isURL: str => new RegExp("^(?:(?:https?|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))\\.?)(?::\\d{2,5})?(?:[/?#]\\S*)?$","i").test(str),
2825

0 commit comments

Comments
 (0)