From 293a4e5b638a6f2df9538c036262f9955d5f6002 Mon Sep 17 00:00:00 2001 From: Richie Bendall Date: Thu, 16 Jan 2020 17:41:44 +1300 Subject: [PATCH] Use newer syntax in the makefile (#33) Co-authored-by: Sindre Sorhus --- makefile.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/makefile.js b/makefile.js index 0dae68c..b21f800 100755 --- a/makefile.js +++ b/makefile.js @@ -12,19 +12,17 @@ const load = value => { const darwin = load('darwin'); const win32 = load('win32'); +const data = Object.entries(darwin).map(([name, figure]) => [name, figure, win32[name]]); + const jsonTable = [ [ 'Name', 'Real OSes', 'Windows' - ] + ], + ...data ]; -// TODO: Use `Object.entries` when targeting Node.js 8 -for (const key of Object.keys(darwin)) { - jsonTable.push([key, darwin[key], win32[key]]); -} - const figureTable = table(jsonTable, { align: [ '',