classgen
v0.0.3
Published
generate prototype class code from json arrays
Downloads
1
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 () {
}