prototype-decorator

0.0.3 • Public • Published

Prototype Decorator

This project made because right now the class initializing spec it unclear and both in the current spec there is a missing key of what happen when you need to initialize a propery for using it with super class constructor. However when the environment isn't set to production, it will throw if you override existing property of the class.

Installing

npm install prototype-decorator

How to use

import prototype from 'prototype-decorator';


class Parent {
  constructor() {
    console.log(this.hello);
  }
}

@prototype({ hello: "hello world!" })
class Child {}

new Child(); // log: hello world!

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.31latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.31

Package Sidebar

Install

npm i prototype-decorator

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • orisomething