Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nodejs require everything without prefix

// file1.js
module.exports = {foo, bar, baz}
// file2.js
const {foo, bar, baz} = require('./file1');
foo();
baz();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #nodejs #require #prefix
ADD COMMENT
Topic
Name
4+2 =