(Vue)
| 3848 | /* */ |
| 3849 | |
| 3850 | function initUse (Vue) { |
| 3851 | Vue.use = function (plugin) { |
| 3852 | /* istanbul ignore if */ |
| 3853 | if (plugin.installed) { |
| 3854 | return |
| 3855 | } |
| 3856 | // additional parameters |
| 3857 | var args = toArray(arguments, 1); |
| 3858 | args.unshift(this); |
| 3859 | if (typeof plugin.install === 'function') { |
| 3860 | plugin.install.apply(plugin, args); |
| 3861 | } else if (typeof plugin === 'function') { |
| 3862 | plugin.apply(null, args); |
| 3863 | } |
| 3864 | plugin.installed = true; |
| 3865 | return this |
| 3866 | }; |
| 3867 | } |
| 3868 | |
| 3869 | /* */ |
| 3870 |
no test coverage detected