24
rated 0 times
[
30]
[
6]
/ answers: 1 / hits: 26156
/ 8 Years ago, fri, july 29, 2016, 12:00:00
I am trying to understand the difference between the two 'require' statements below.
Specifically, what is the purpose of the { }
s wrapped around ipcMain
?
const electron = require('electron')
const {ipcMain} = require('electron')
They both appear to assign the contents of the electron
module, but they obviously function differently.
Can anyone shed some light?
More From » node.js