Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const cache = {}
- function fn (state, emit) {
- return function (Component, id, ...args) {
- if (cache[id] !== undefined) return cache[id]
- cache[id] = new Component(this, state, emit, args)
- return cache[id]
- }
- }
- export default fn
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement