app-decorators-element-to-function

0.8.252 • Public • Published

app-decorators-element-to-function

Dependency Status devDependency Status

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

/app-decorators-element-to-function/

    Package Sidebar

    Install

    npm i app-decorators-element-to-function

    Weekly Downloads

    0

    Version

    0.8.252

    License

    MIT

    Last publish

    Collaborators

    • serkansipahi