約2,880,000件1ページ目

日本語のみで絞り込む

2023/10/23 -exports is for CJS modules which are pulled into other code via require . export is for ESM modules, which are pulled in via import .

2011/8/21 -exports and module.exports both point to the same object. exports is a variable and module.exports is an attribute of the module object.

2024/9/16 -module.exports is used when there is only a single item e.g., function, object or variable that needs to be exported, while exports is used ...

2023/4/28 -exports is used to export a single function or object from a module, while exports is used to export multiple properties or functions. It's ...

2023/5/9 -module.exports represents the actual value of the exported values in a module and exports is simply a reference to module.exports .

How to export a module in Node.js and JavaScript How to create different file extensions in Node.js and JavaScript and their meaning Program ...

YouTubeDr Nitin Naik - Aston University, UK

2023/2/28 -When should you choose exports over module.exports ? The short answer is that you probably shouldn't. While exports may be shorter and seem more ...

2024/4/4 -In Node.js, both module.exports and exports are used to define the exports of a module, but there are differences in how they can be used.

2016/9/7 -Think of module.exports as the variable that gets returned from require(). It is an empty object by default, and it is fine to change to ...

How module.exports works in Node.js: export a function or an object, the exports reassignment trap, the require cache, and the ES module equivalents.