Comparing version 10.0.0 to 10.0.1
@@ -5,3 +5,3 @@ /** | ||
* @author Gerald Yeo <contact@fusedthought.com> | ||
* @version: 10.0.0 | ||
* @version: 10.0.1 | ||
* @license: MIT | ||
@@ -8,0 +8,0 @@ **/ |
@@ -5,3 +5,3 @@ /** | ||
* @author Gerald Yeo <contact@fusedthought.com> | ||
* @version: 10.0.0 | ||
* @version: 10.0.1 | ||
* @license: MIT | ||
@@ -8,0 +8,0 @@ **/ |
@@ -5,3 +5,3 @@ /** | ||
* @author Gerald Yeo <contact@fusedthought.com> | ||
* @version: 10.0.0 | ||
* @version: 10.0.1 | ||
* @license: MIT | ||
@@ -8,0 +8,0 @@ **/ |
@@ -5,3 +5,3 @@ /** | ||
* @author Gerald Yeo <contact@fusedthought.com> | ||
* @version: 10.0.0 | ||
* @version: 10.0.1 | ||
* @license: MIT | ||
@@ -8,0 +8,0 @@ **/ |
{ | ||
"name": "otplib", | ||
"version": "10.0.0", | ||
"version": "10.0.1", | ||
"description": "HMAC-based (HOTP) and Time-based (TOTP) One-Time Password library", | ||
@@ -50,3 +50,3 @@ "main": "./index.js", | ||
"dtslint": "^0.3.0", | ||
"eslint": "^4.18.2", | ||
"eslint": "^5.0.0", | ||
"eslint-config-prettier": "^2.9.0", | ||
@@ -57,5 +57,5 @@ "eslint-plugin-prettier": "^2.6.0", | ||
"minami": "^1.1.1", | ||
"prettier": "1.13.5", | ||
"prettier": "1.13.7", | ||
"rimraf": "^2.6.1", | ||
"rollup": "^0.60.0", | ||
"rollup": "^0.62.0", | ||
"rollup-plugin-cleanup": "^2.0.0", | ||
@@ -62,0 +62,0 @@ "rollup-plugin-node-resolve": "^3.0.0", |
@@ -5,3 +5,3 @@ /** | ||
* @author Gerald Yeo <contact@fusedthought.com> | ||
* @version: 10.0.0 | ||
* @version: 10.0.1 | ||
* @license: MIT | ||
@@ -8,0 +8,0 @@ **/ |
10
utils.js
@@ -5,3 +5,3 @@ /** | ||
* @author Gerald Yeo <contact@fusedthought.com> | ||
* @version: 10.0.0 | ||
* @version: 10.0.1 | ||
* @license: MIT | ||
@@ -21,4 +21,10 @@ **/ | ||
function isValidToken(value) { | ||
return /^(\d+)(\.\d+)?$/.test(value); | ||
} | ||
function isSameToken(token1, token2) { | ||
return parseFloat(token1) === parseFloat(token2); | ||
if (isValidToken(token1) && isValidToken(token2)) { | ||
return String(token1) === String(token2); | ||
} | ||
return false; | ||
} | ||
@@ -25,0 +31,0 @@ |
Sorry, the diff of this file is too big to display
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
195735
1040