Updated examples and tests

This commit is contained in:
Alexander Cerutti
2019-06-27 23:43:44 +02:00
parent 05193aa32a
commit 53441a9b2f
3 changed files with 29 additions and 30 deletions

View File

@@ -35,7 +35,7 @@ app.all(async function manageRequest(request, response) {
// After this, pass.props["barcodes"] will have support for all the formats
// while pass.props["barcode"] will be the first of barcodes.
bc = pass.barcode("Thank you for using this package <3");
bc = pass.barcode("Thank you for using this package <3") as PassWithBarcodeMethods
} else {
// After this, pass.props["barcodes"] will have support for just two of three
// of the passed format (the valid ones) and pass.props["barcode"] the first of barcodes.
@@ -50,7 +50,7 @@ app.all(async function manageRequest(request, response) {
}, {
message: "Thank you for using this package <3",
format: "PKBarcodeFormatMock44617"
});
}) as PassWithBarcodeMethods;
}
// You can change the format chosen for barcode prop support by calling .backward()

View File

@@ -50,8 +50,9 @@ app.all(async function manageRequest(request, response) {
// This language does not exist but is still added as .lproj folder
pass.localize("zu", {});
// @ts-ignore - ignoring for logging purposes. Do not replicate
console.log("Added languages", Object.keys(pass.l10nBundles).join(", "))
console.log("Added languages", pass.localize().join(", "))
const stream = pass.generate();
response.set({