Skip to content

Commit

Permalink
Use newer syntax in the makefile (#33)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
Richienb and sindresorhus committed Jan 16, 2020
1 parent a14e883 commit 293a4e5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions makefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
'',
Expand Down

0 comments on commit 293a4e5

Please sign in to comment.