const items = [{ a: 1, b: 2 }, { a: 3, b: 4 }, ...];
items.map(({ a, b }) => ... );
items.filter(({ a, b }) => ... );
items.forEach(({ a, b }) => ... );
import open from 'open';
...
...
...
app.on('web-contents-created', (_event, contents) => {
contents.on('new-window', (e, urlLink) => {
e.preventDefault();
open(urlLink);
});
contents.on('will-navigate', (e, urlLink) => {
if (urlLink !== contents.getURL()) {
e.preventDefault();
open(urlLink);
}
});
});