Comparing version 0.0.8 to 0.0.10
@@ -42,2 +42,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createQRCode = exports.encodeWifiConfig = void 0; | ||
var qrcode_1 = __importDefault(require("qrcode")); | ||
@@ -77,3 +78,3 @@ /** | ||
*/ | ||
exports.encodeWifiConfig = function (config) { | ||
var encodeWifiConfig = function (config) { | ||
var type = encodeTag('T', config.type); | ||
@@ -86,2 +87,3 @@ var ssid = encodeTag('S', config.ssid, true); | ||
}; | ||
exports.encodeWifiConfig = encodeWifiConfig; | ||
/** | ||
@@ -93,6 +95,7 @@ * Create a QRCode wrapper that can export the QR code data in various formats. | ||
*/ | ||
exports.createQRCode = function (config, qrOptions) { | ||
var createQRCode = function (config, qrOptions) { | ||
var code = qrcode_1.default.create(exports.encodeWifiConfig(config), qrOptions || {}); | ||
return new WifiQRWrapper(code); | ||
}; | ||
exports.createQRCode = createQRCode; | ||
/** | ||
@@ -99,0 +102,0 @@ * Wrapper around a QRCode that can export the code to multiple destinations. |
@@ -10,3 +10,3 @@ module.exports = { | ||
'ts-jest': { | ||
tsConfig: { | ||
tsconfig: { | ||
importHelpers: true, | ||
@@ -13,0 +13,0 @@ }, |
{ | ||
"name": "wifi-qr", | ||
"version": "0.0.8", | ||
"version": "0.0.10", | ||
"description": "Command-line utility to generate QR codes for wifi access", | ||
@@ -48,8 +48,8 @@ "main": "dist/index.js", | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"jest": "^24.9.0", | ||
"jest": "^26.6.3", | ||
"prettier": "^1.19.1", | ||
"ts-jest": "^24.2.0", | ||
"ts-jest": "^26.4.4", | ||
"ts-node": "^8.5.4", | ||
"typescript": "^3.7.4" | ||
"typescript": "^4.1.2" | ||
} | ||
} |
40741
793