From 447d71709edebad69ef35dc68ad07764582b0b68 Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Sat, 30 Mar 2019 00:45:02 +0100 Subject: [PATCH] Improved indentation in fields example --- examples/fields.js | 160 ++++++++++++++++++++++----------------------- src/pass.js | 12 ++-- 2 files changed, 86 insertions(+), 86 deletions(-) diff --git a/examples/fields.js b/examples/fields.js index 4ef45b3..9832f97 100644 --- a/examples/fields.js +++ b/examples/fields.js @@ -36,11 +36,11 @@ app.all(function manageRequest(request, response) { "value": "25 mag", "textAlignment": "PKTextAlignmentCenter" }, { - "key": "header2", - "label": "Volo", - "value": "EZY997", - "textAlignment": "PKTextAlignmentCenter" - }); + "key": "header2", + "label": "Volo", + "value": "EZY997", + "textAlignment": "PKTextAlignmentCenter" + }); pass.primaryFields.push({ key: "IATA-source", @@ -48,11 +48,11 @@ app.all(function manageRequest(request, response) { label: "Napoli", textAlignment: "PKTextAlignmentLeft" }, { - key: "IATA-destination", - value: "VCE", - label: "Venezia Marco Polo", - textAlignment: "PKTextAlignmentRight" - }); + key: "IATA-destination", + value: "VCE", + label: "Venezia Marco Polo", + textAlignment: "PKTextAlignmentRight" + }); pass.secondaryFields.push({ "key": "secondary1", @@ -60,21 +60,21 @@ app.all(function manageRequest(request, response) { "value": "18:40", "textAlignment": "PKTextAlignmentCenter", }, { - "key": "sec2", - "label": "Partenze", - "value": "19:10", - "textAlignment": "PKTextAlignmentCenter" - }, { - "key": "sec3", - "label": "SB", - "value": "Sì", - "textAlignment": "PKTextAlignmentCenter" - }, { - "key": "sec4", - "label": "Imbarco", - "value": "Anteriore", - "textAlignment": "PKTextAlignmentCenter" - }); + "key": "sec2", + "label": "Partenze", + "value": "19:10", + "textAlignment": "PKTextAlignmentCenter" + }, { + "key": "sec3", + "label": "SB", + "value": "Sì", + "textAlignment": "PKTextAlignmentCenter" + }, { + "key": "sec4", + "label": "Imbarco", + "value": "Anteriore", + "textAlignment": "PKTextAlignmentCenter" + }); pass.auxiliaryFields.push({ "key": "aux1", @@ -82,11 +82,11 @@ app.all(function manageRequest(request, response) { "value": "MR. WHO KNOWS", "textAlignment": "PKTextAlignmentLeft" }, { - "key": "aux2", - "label": "Posto", - "value": "1A*", - "textAlignment": "PKTextAlignmentCenter" - }); + "key": "aux2", + "label": "Posto", + "value": "1A*", + "textAlignment": "PKTextAlignmentCenter" + }); pass.backFields.push({ "key": "document number", @@ -94,56 +94,56 @@ app.all(function manageRequest(request, response) { "value": "- -", "textAlignment": "PKTextAlignmentLeft" }, { - "key": "You're checked in, what next", - "label": "Hai effettuato il check-in, Quali sono le prospettive", - "value": "", - "textAlignment": "PKTextAlignmentLeft" - }, { - "key": "Check In", - "label": "1. check-in✓", - "value": "", - "textAlignment": "PKTextAlignmentLeft" - }, { - "key": "checkIn", - "label": "", - "value": "Le uscite d'imbarco chiudono 30 minuti prima della partenza, quindi sii puntuale. In questo aeroporto puoi utilizzare la corsia Fast Track ai varchi di sicurezza.", - "textAlignment": "PKTextAlignmentLeft" - }, { - "key": "2. Bags", - "label": "2. Bagaglio", - "value": "", - "textAlignment": "PKTextAlignmentLeft" - }, { - "key": "Require special assistance", - "label": "Assistenza speciale", - "value": "Se hai richiesto assistenza speciale, presentati a un membro del personale nell'area di Consegna bagagli almeno 90 minuti prima del volo.", - "textAlignment": "PKTextAlignmentLeft" - }, { - "key": "3. Departures", - "label": "3. Partenze", - "value": "", - "textAlignment": "PKTextAlignmentLeft" - }, { - "key": "photoId", - "label": "Un documento d’identità corredato di fotografia", - "value": "è obbligatorio su TUTTI i voli. Per un viaggio internazionale è necessario un passaporto valido o, dove consentita, una carta d’identità.", - "textAlignment": "PKTextAlignmentLeft" - }, { - "key": "yourSeat", - "label": "Il tuo posto:", - "value": "verifica il tuo numero di posto nella parte superiore. Durante l’imbarco utilizza le scale anteriori e posteriori: per le file 1-10 imbarcati dalla parte anteriore; per le file 11-31 imbarcati dalla parte posteriore. Colloca le borse di dimensioni ridotte sotto il sedile davanti a te.", - "textAlignment": "PKTextAlignmentLeft" - }, { - "key": "Pack safely", - "label": "Bagaglio sicuro", - "value": "Fai clic http://easyjet.com/it/articoli-pericolosi per maggiori informazioni sulle merci pericolose oppure visita il sito CAA http://www.caa.co.uk/default.aspx?catid=2200", - "textAlignment": "PKTextAlignmentLeft" - }, { - "key": "Thank you for travelling easyJet", - "label": "Grazie per aver viaggiato con easyJet", - "value": "", - "textAlignment": "PKTextAlignmentLeft" - }); + "key": "You're checked in, what next", + "label": "Hai effettuato il check-in, Quali sono le prospettive", + "value": "", + "textAlignment": "PKTextAlignmentLeft" + }, { + "key": "Check In", + "label": "1. check-in✓", + "value": "", + "textAlignment": "PKTextAlignmentLeft" + }, { + "key": "checkIn", + "label": "", + "value": "Le uscite d'imbarco chiudono 30 minuti prima della partenza, quindi sii puntuale. In questo aeroporto puoi utilizzare la corsia Fast Track ai varchi di sicurezza.", + "textAlignment": "PKTextAlignmentLeft" + }, { + "key": "2. Bags", + "label": "2. Bagaglio", + "value": "", + "textAlignment": "PKTextAlignmentLeft" + }, { + "key": "Require special assistance", + "label": "Assistenza speciale", + "value": "Se hai richiesto assistenza speciale, presentati a un membro del personale nell'area di Consegna bagagli almeno 90 minuti prima del volo.", + "textAlignment": "PKTextAlignmentLeft" + }, { + "key": "3. Departures", + "label": "3. Partenze", + "value": "", + "textAlignment": "PKTextAlignmentLeft" + }, { + "key": "photoId", + "label": "Un documento d’identità corredato di fotografia", + "value": "è obbligatorio su TUTTI i voli. Per un viaggio internazionale è necessario un passaporto valido o, dove consentita, una carta d’identità.", + "textAlignment": "PKTextAlignmentLeft" + }, { + "key": "yourSeat", + "label": "Il tuo posto:", + "value": "verifica il tuo numero di posto nella parte superiore. Durante l’imbarco utilizza le scale anteriori e posteriori: per le file 1-10 imbarcati dalla parte anteriore; per le file 11-31 imbarcati dalla parte posteriore. Colloca le borse di dimensioni ridotte sotto il sedile davanti a te.", + "textAlignment": "PKTextAlignmentLeft" + }, { + "key": "Pack safely", + "label": "Bagaglio sicuro", + "value": "Fai clic http://easyjet.com/it/articoli-pericolosi per maggiori informazioni sulle merci pericolose oppure visita il sito CAA http://www.caa.co.uk/default.aspx?catid=2200", + "textAlignment": "PKTextAlignmentLeft" + }, { + "key": "Thank you for travelling easyJet", + "label": "Grazie per aver viaggiato con easyJet", + "value": "", + "textAlignment": "PKTextAlignmentLeft" + }); pass.generate().then(function (stream) { response.set({ diff --git a/src/pass.js b/src/pass.js index df6d684..48c0c39 100644 --- a/src/pass.js +++ b/src/pass.js @@ -699,8 +699,8 @@ class Pass { * Validates the contents of the passed options and handle them * * @function readCertificates - * @params {Object} certificates - certificates object with raw content and, optionally, - * the already parsed certificates + * @params {Object} certificates - certificates object with raw content + * and, optionally, the already parsed certificates * @returns {Object} - parsed certificates to be pushed to Pass.Certificates. */ @@ -817,11 +817,11 @@ function dateToW3CString(date, format) { } /** - * Apply a filter to arg0 to remove hidden files names (starting with dot) + * Apply a filter to arg0 to remove hidden files names (starting with dot) * - * @function removeHidden - * @params {String[]} from - list of file names - * @return {String[]} + * @function removeHidden + * @params {String[]} from - list of file names + * @return {String[]} */ function removeHidden(from) {