Modules# Stability: 5 - Locked Node ã¯ã‚·ãƒ³ãƒ—ルãªãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ãƒãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ ã‚’æŒã¡ã¾ã™ã€‚ Node ã§ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã¨ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯ï¼‘対1ã«å¯¾å¿œã—ã¾ã™ã€‚ 例ã¨ã—ã¦ã€ foo.js ã¯ã€åŒã˜ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚ã‚‹ circle.js ã‚’ãƒãƒ¼ãƒ‰ã—ã¦ã„ã¾ã™ã€‚ foo.js ã®å†…容: var circle = require('./circle.js'); console.log( 'The area of a circle of radius 4 is ' + circle.area(4)); circle.js ã®å†…容: var PI = Math.PI; exports.area = function (r) { return PI * r * r; }; exports.circumference = function (r) { return 2 * PI
{{#tags}}- {{label}}
{{/tags}}