Miss any of our Open RFC calls?Watch the recordings here! »

classgen

0.0.3 • Public • Published

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 () {
}

Install

npm i classgen

DownloadsWeekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • avatar
  • avatar