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