@darabonba/emitter
v1.0.0
Published
The emitter for codegen
Downloads
42
Keywords
Readme
Emitter for Codegen
Installation
$ npm i @darabonba/emitter -S
Usage
const Emitter = require('@darabonba/emitter');
const emtter = new Emitter();
emitter.emitln(`function demo() {`);
emitter.emitln(`console.log("Hello world!");`, 1);
emitter.emitln(`}`);
console.log(emitter.output);
The output:
function demo() {
console.log("Hello world!");
}
License
The Apache License 2.0