Comparing version 0.0.8 to 0.0.9
@@ -1,2 +0,5 @@ | ||
// Generate a random justinfan username.. | ||
var toNumber = require("underscore.string/toNumber"), | ||
ltrim = require("underscore.string/ltrim"); | ||
// Generate a random justinfan username | ||
function generateJustinfan() { | ||
@@ -6,17 +9,17 @@ return "justinfan" + Math.floor((Math.random() * 80000) + 1000); | ||
// Value is an integer.. | ||
// Determine if value is a valid integer | ||
function isInteger(value) { | ||
var n = ~~Number(value); | ||
return String(n) === value; | ||
//0 decimal places | ||
var maybeNumber = toNumber(value, 0); | ||
return isNaN(maybeNumber); | ||
} | ||
// Normalize channel name.. | ||
// Normalize channel name by including the hash | ||
function normalizeChannel(name) { | ||
if (name.indexOf("#") !== 0) { name = "#" + name; } | ||
return name.toLowerCase(); | ||
return "#" + ltrim(name, "#"); | ||
} | ||
// Normalize username.. | ||
// Normalize username by removing the hash | ||
function normalizeUsername(username) { | ||
return username.replace("#", "").toLowerCase(); | ||
return ltrim(username, "#"); | ||
} | ||
@@ -23,0 +26,0 @@ |
{ | ||
"name": "tmi.js", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Javascript library for the Twitch Messaging Interface.", | ||
@@ -18,3 +18,4 @@ "main": "index.js", | ||
"vow": "^0.4.10", | ||
"ws": "^0.7.2" | ||
"ws": "^0.7.2", | ||
"underscore.string": "^3.1.1" | ||
}, | ||
@@ -21,0 +22,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62932
1254
8
+ Addedunderscore.string@^3.1.1
+ Addedsprintf-js@1.1.3(transitive)
+ Addedunderscore.string@3.3.6(transitive)
+ Addedutil-deprecate@1.0.2(transitive)