fix: export not default class

This commit is contained in:
lancegin
2017-06-29 14:39:24 +08:00
parent 5a82eb6db6
commit 5544c86620
4 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -4,12 +4,12 @@
* @author : Gin (gin.lance.inside@hotmail.com)
*/
export default class Base32 {
export class Base32 {
static decode() {
console.log("static Base32.decode");
return "static Base32.decode";
}
static random_gen() {
console.log("static Base32.random_gen");
return "static Base32.random_gen";
}
}
+3 -3
View File
@@ -5,7 +5,7 @@
import OTP from './otp';
export default class HOTP extends OTP {
export class HOTP extends OTP {
/*
* Generate the OTP with the given count
*
@@ -22,7 +22,7 @@ export default class HOTP extends OTP {
* ```
*/
at(count) {
console.log("HOTP.at");
return "HOTP.at";
}
/*
@@ -47,6 +47,6 @@ export default class HOTP extends OTP {
* ```
*/
verify(otp, counter) {
console.log("HOTP.verify");
return "HOTP.verify";
}
}
+2 -2
View File
@@ -3,7 +3,7 @@
* @author : Gin (gin.lance.inside@hotmail.com)
*/
export default class OTP {
export class OTP {
/*
* This constructor will create OTP instance.
*
@@ -41,7 +41,7 @@ export default class OTP {
* @return {OTP}
*/
generate_otp(input) {
console.log("OTP.generate_otp");
return "OTP.generate_otp";
}
}
+3 -3
View File
@@ -5,7 +5,7 @@
import OTP from './otp';
export default class TOTP extends OTP {
export class TOTP extends OTP {
/*
* @param {secret}
* @type {String}
@@ -35,7 +35,7 @@ export default class TOTP extends OTP {
* ```
*/
now() {
console.log("TOTP.now");
return "TOTP.now";
}
/*
@@ -62,6 +62,6 @@ export default class TOTP extends OTP {
* ```
*/
verify(otp, time=null) {
console.log("TOTP.verify");
return "TOTP.verify";
}
}