1.3.0 • Published 10 months ago
observe5 v1.3.0
Observe or emitter
setup
yarn add observe5 or pnpm add observe5
Example
import Observe5 from 'observe5'
const Observe = new Observe5<{eventName: DataType}>();
Observe.on('eventName',callback)
Observe.emit('eventName',data)
Observe.off('eventName')
Demo
import Observe5 from 'observe5'
// create Observe
const Observe = new Observe5<{test: string}>();
// watch eventName for test
Observe.on('test',(res)=>{
console.log(res)
})
// it is true.
Observe.emit('test',"test")
// it is error code.
Observe.emit('test',1)
1.3.0
10 months ago
1.2.9
10 months ago
1.2.8
10 months ago
1.2.7
10 months ago
1.2.6
10 months ago
1.2.5
10 months ago
1.2.4
10 months ago
1.2.3
10 months ago
1.2.2
10 months ago
1.2.1
10 months ago
1.2.0
10 months ago
1.1.9
10 months ago
1.1.8
10 months ago
1.1.7
10 months ago
1.1.6
10 months ago
1.1.5
10 months ago
1.1.4
10 months ago
1.1.3
10 months ago
1.1.2
10 months ago
1.1.1
10 months ago