(Vue)
| 3858 | /* */ |
| 3859 | |
| 3860 | function initUse (Vue) { |
| 3861 | Vue.use = function (plugin) { |
| 3862 | /* istanbul ignore if */ |
| 3863 | if (plugin.installed) { |
| 3864 | return |
| 3865 | } |
| 3866 | // additional parameters |
| 3867 | var args = toArray(arguments, 1); |
| 3868 | args.unshift(this); |
| 3869 | if (typeof plugin.install === 'function') { |
| 3870 | plugin.install.apply(plugin, args); |
| 3871 | } else if (typeof plugin === 'function') { |
| 3872 | plugin.apply(null, args); |
| 3873 | } |
| 3874 | plugin.installed = true; |
| 3875 | return this |
| 3876 | }; |
| 3877 | } |
| 3878 | |
| 3879 | /* */ |
| 3880 |
no test coverage detected