New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@amiceli/vue-socket.io-extended

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amiceli/vue-socket.io-extended

Socket.io bindings for Vue.js and Vuex (inspired by Vue-Socket.io)

latest
Source
npmnpm
Version
4.0.4
Version published
Weekly downloads
5
-44.44%
Maintainers
1
Weekly downloads
 
Created
Source

@amiceli/vue-socket.io-extended

This project is a fork of vue-socket.io-extended.

Currenlty it added event mapping feature. My PR is still waiting so I publish my own version.

install

npm install @amiceli/vue-socket.io-extended -S

event mapping

A socket io event example

{ name : 'event', data : { task : 'synchronize', progress : 90 } }

Map event name to task data :

const options = {
    eventMapping : (eventName, args) => {
        const data = args[0]

        return data.task
    }
}

An use it in your component :

Vue.use(VueSocketIOExt, socket, options);

export default {
    sockets : {
        synchronize () {
            console.log ('progress received')
        }
    }
}

Keywords

vuejs

FAQs

Package last updated on 08 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts