Skip to content

Convert javascript file from CommonJS type to ES6 type.

License

Notifications You must be signed in to change notification settings

zhengsk/cjs-es6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cjs-es6

Convert javascript file from CommonJS type to ES6 type.

Install

npm install -S cjs-es6
  const cjsEs6 = require('cjs-es6');

  const codeStr = 'module.exports = abc'
  const result = cjsEs6(codeStr); // export default abc;

About

Convert javascript file from CommonJS type to ES6 type.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published