An open API service indexing awesome lists of open source software.

https://github.com/kessler/classgen


https://github.com/kessler/classgen

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# classgen
generate prototype classes from json arrays

## install
```
$ npm install -g classgen
```

## usage
```
$ echo '[ "bar" ]' | classgen
```
prints:
```
function Foo() {
}

Foo.prototype.bar = function () {
}
```
replace class name:
```
$ echo '[ "bar", "foo" ]' | classgen --class=Bleep
```
prints:
```
function Bleep() {
}

Bleep.prototype.bleep = function () {
}

Bleep.prototype.bar = function () {
}
```