🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

classgen

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

classgen

generate prototype class code from json arrays

0.0.3
latest
Source
npm
Version published
Weekly downloads
6
500%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

code generation

FAQs

Package last updated on 08 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts