日本語のみで絞り込む
5日前 -The export declaration is used to export values from a JavaScript module. Exported values can then be imported into other programs with the ...
2022/4/25 -Using module.exports is a way of explicitly specifying a module's exports. And this should ideally only exist once in a file. If it exists twice ...
2017/7/18 -In Node you export things with module.exports special object. For example: This exports both functions: module.exports = { foo, bar };.
2026/10/19 -How to work with modules in Node.js how to export and consume them, and explaining the difference between module.exports and exports.
2018/12/27 -Module exports are the instruction that tells Node.js which bits of code (functions, objects, strings, etc.) to “export” from a given file so ...
A module uses the export keyword to share values with other files. A module can have many named exports. A module can (optionally) have one default export.
Q.javascriptで、ブラウザ内のscript内で下記のstrrevを使うにはどのようにしたらいいでしょうか? module.exports = function strrev (string...
A.こちらはnode.jsなので https://mindcat.hatenadiary.org/entry/20110821/1313946427 こちらのやり方はどうでしょうか?
Q.JavaScriptのコンポーネントって普通どうやって作りますか? 趣味でWebアプリの制作を行っているのですが、コンポーネントはどのように制作していますか?例えばinput:textに入力さ...
A.defaultでエクスポートしたモジュールは 他のファイルにインポートする際任意の名前でインポートできます。 モジュールファイルの中から 特定のモジュールをインポートしたい場合は expor...
Confused about `module.exports` in Node.js? This video breaks down everything you need to know as a beginner! We'll cover how to export ...
YouTubeCodeLucky
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 .
2023/11/26 -In JavaScript, if we want to access functions from another file we have to use module.exports and require. This involves two steps.
When you want to share functions, objects, or values from one file so that another file can use them, you use module.exports in Node.js.