Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to change function name while exporting in node

function doSomthing(){
  console.log('Hello Word')
}
// do is the name which you want to use in other files 
module.exports = { do:doSomthing }
 
PREVIOUS NEXT
Tagged: #change #function #exporting #node
ADD COMMENT
Topic
Name
4+1 =