https://github.com/awinterman/rocambole-commafirst
commafirst plugin for rocambole
https://github.com/awinterman/rocambole-commafirst
Last synced: 9 months ago
JSON representation
commafirst plugin for rocambole
- Host: GitHub
- URL: https://github.com/awinterman/rocambole-commafirst
- Owner: AWinterman
- Created: 2014-06-18T21:35:45.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-23T22:13:14.000Z (about 12 years ago)
- Last Synced: 2025-02-01T08:05:05.994Z (over 1 year ago)
- Language: JavaScript
- Size: 164 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Transforms your code, converting comma last to comma first.
Install with `npm i rocambole-commafirst`
```javascript
var commafirst = require('rocambole-commafirst')
, rocambole = require('rocambole')
var source = fs.readFileSync('path/to/js/file.js').toString()
var ast = rocambole.parse(source)
commafirst.transform(ast)
ast.toString() // is your transformed source
// OR
rocambole.moonwalk(ast, commafirst)
```