mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
19 lines
451 B
JavaScript
19 lines
451 B
JavaScript
var PluginDecotor = (function () {
|
|
function PluginDecotor(cls, config) {
|
|
this.cls = cls;
|
|
this.config = config;
|
|
}
|
|
return PluginDecotor;
|
|
})();
|
|
function Plugin(config) {
|
|
return function (cls) {
|
|
for (var _i = 0; _i < config.length; _i++) {
|
|
var k = config[_i];
|
|
cls[k] = config[k];
|
|
}
|
|
console.log('Decorated', cls, config);
|
|
return cls;
|
|
};
|
|
}
|
|
exports.Plugin = Plugin;
|