From cfb335902c018fea1d650a59c93bb18160ef5a0e Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 1 Apr 2019 01:58:47 -0600 Subject: [PATCH] v0.9.1: whitspace fixes --- README.md | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index c042b64..baa2083 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,10 @@ part of the name of the file storage path where the certificate will be saved (o function approveDomains(opts, certs, cb) { // foo.example.com => *.example.com var wild = '*.' + opts.domain.split('.').slice(1).join('.'); - if ('*.example.com' !== wild) { cb(new Error(opts.domain + " is not allowed")); } + if ('*.example.com' !== wild) { cb(new Error(opts.domain + " is not allowed")); } - opts.subject = '*.example.com'; - opts.domains = ['*.example.com']; + opts.subject = '*.example.com'; + opts.domains = ['*.example.com']; cb({ options: opts, certs: certs }); } @@ -73,10 +73,10 @@ function approveDomains(opts, certs, cb) { ```js function approveDomains(opts, certs, cb) { var related = getRelated(opts.domain); - if (!related) { cb(new Error(opts.domain + " is not allowed")); }; + if (!related) { cb(new Error(opts.domain + " is not allowed")); }; - opts.subject = related.subject; - opts.domains = related.domains; + opts.subject = related.subject; + opts.domains = related.domains; cb({ options: opts, certs: certs }); } @@ -86,13 +86,13 @@ function approveDomains(opts, certs, cb) { function getRelated(domain) { var related; var wild = '*.' + domain.split('.').slice(1).join('.'); - if (Object.keys(allAllowedDomains).some(function (k) { - return allAllowedDomains[k].some(function (name) { - if (domain === name || wild === name) { + if (Object.keys(allAllowedDomains).some(function (k) { + return allAllowedDomains[k].some(function (name) { + if (domain === name || wild === name) { related = { subject: k, altnames: allAllowedDomains[k] }; - return true; - } - }); + return true; + } + }); })) { return related; } diff --git a/package.json b/package.json index be5df16..c162a32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "le-store-fs", - "version": "0.9.0", + "version": "0.9.1", "description": "A file-based certificate store for greenlock that supports wildcards.", "homepage": "https://git.coolaj86.com/coolaj86/le-store-fs.js", "main": "index.js",