mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
refactor(decorators): use arrow functions
This commit is contained in:
parent
be345ea829
commit
8cf332f0ff
@ -188,33 +188,21 @@ export function Plugin(config: PluginConfig) {
|
||||
cls[k] = config[k];
|
||||
}
|
||||
|
||||
cls['installed'] = function(printWarning?: boolean) {
|
||||
return !!getPlugin(config.pluginRef);
|
||||
};
|
||||
cls['installed'] = () => !!getPlugin(config.pluginRef);
|
||||
|
||||
cls['getPlugin'] = function() {
|
||||
return getPlugin(config.pluginRef);
|
||||
};
|
||||
cls['getPlugin'] = () => getPlugin(config.pluginRef);
|
||||
|
||||
cls['checkInstall'] = function() {
|
||||
return checkAvailability(cls) === true;
|
||||
};
|
||||
cls['checkInstall'] = () => (checkAvailability(cls) === true);
|
||||
|
||||
cls['getPluginName'] = function() {
|
||||
return config.pluginName;
|
||||
};
|
||||
cls['getPluginRef'] = function() {
|
||||
return config.pluginRef;
|
||||
};
|
||||
cls['getPluginInstallName'] = function() {
|
||||
return config.plugin;
|
||||
};
|
||||
cls['getPluginRepo'] = function() {
|
||||
return config.repo;
|
||||
};
|
||||
cls['getSupportedPlatforms'] = function() {
|
||||
return config.platforms;
|
||||
};
|
||||
cls['getPluginName'] = () => config.pluginName;
|
||||
|
||||
cls['getPluginRef'] = () => config.pluginRef;
|
||||
|
||||
cls['getPluginInstallName'] = () => config.plugin;
|
||||
|
||||
cls['getPluginRepo'] = () => config.repo;
|
||||
|
||||
cls['getSupportedPlatforms'] = () => config.platforms;
|
||||
|
||||
return cls;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user