From a4b39215eaec0eea13351c55e05ba164084e19cc Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 8 Oct 2018 01:19:24 +0000 Subject: [PATCH] add perms to email --- lib/extensions/perms-to-email.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/extensions/perms-to-email.js diff --git a/lib/extensions/perms-to-email.js b/lib/extensions/perms-to-email.js new file mode 100644 index 0000000..80bc9ac --- /dev/null +++ b/lib/extensions/perms-to-email.js @@ -0,0 +1,12 @@ +'use strict'; + +var perms = require('./permissions.json'); +var emails = {}; +perms.forEach(function (p) { + p.nodes.forEach(function (n) { + if ('email' === n.type) { + emails[n.name] = true; + } + }); +}); +console.log(Object.keys(emails).join(', '));