Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript Rename in the module

// renaming import inside module.js
export {
    function1 as newName1,
    function2 as newName2
};

// when you want to use the module
// import in the main file
import { newName1, newName2 } from './module.js';
 
PREVIOUS NEXT
Tagged: #javascript #Rename #module
ADD COMMENT
Topic
Name
6+8 =