0.8.252 • Published 6 years ago

app-decorators-element-to-function v0.8.252

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

app-decorators-element-to-function

Installation

$ npm install app-decorators-element-to-function --save

Usage

The goal of this babel-plugin is for app-decorators @component:

see: https://github.com/babel/babel/issues/1548

app-decorators-element-to-function.js:

let elementToFunction = Element => {
    if(typeof Element === 'function'){
        return Element;
    }

    let _Element = function(){};
    _Element.prototype = Element.prototype;
    return _Element;

};
import ElementToFunc from 'app-decorators-element-to-function';
class Foo extends ElementToFunc(HTMLImageElement) {
    
}
0.8.252

6 years ago

0.8.251

6 years ago

0.8.250

7 years ago

0.8.249

7 years ago

0.8.248

7 years ago

0.8.247

7 years ago

0.8.245

7 years ago