Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhengsk/cjs-es6
Convert javascript file from CommonJS type to ES6 type.
https://github.com/zhengsk/cjs-es6
Last synced: 27 days ago
JSON representation
Convert javascript file from CommonJS type to ES6 type.
- Host: GitHub
- URL: https://github.com/zhengsk/cjs-es6
- Owner: zhengsk
- License: mit
- Created: 2019-04-17T07:51:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-17T08:57:50.000Z (over 5 years ago)
- Last Synced: 2024-10-07T23:15:30.462Z (about 1 month ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cjs-es6
Convert javascript file from CommonJS type to ES6 type.
## Install
```shell
npm install -S cjs-es6
``````js
const cjsEs6 = require('cjs-es6');const codeStr = 'module.exports = abc'
const result = cjsEs6(codeStr); // export default abc;
```