tp-events
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

tp-events

Build Status Coverage Status npm version monthly downloads code style: prettier semantic-release UNPKG liense

Intro

Event based JavaScript for the browser with nodejs events api. For more: Nodejs Events.

Example

import EventEmitter from 'tp-events'
 
class MyEmitter extends EventEmitter {}
 
const myEmitter = new MyEmitter();
myEmitter.on('event', () => {
  console.log('an event occurred!');
});
myEmitter.emit('event');

Install

NPM Badge

API

Please refer to the document on Node.js v9.6.1 Events, API is the same.

Development

  • npm t: Run test suite
  • npm start: Run npm run build in watch mode
  • npm run test:watch: Run test suite in interactive watch mode
  • npm run test:prod: Run linting and generate coverage
  • npm run build: Generate bundles and typings, create docs
  • npm run lint: Lints code
  • npm run commit: Commit using conventional commit style (husky will tell you to use it if you haven't 😉)

Reference

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    3,134
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    3,134
  • 1.0.2
    2
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i tp-events

Weekly Downloads

2,350

Version

1.0.3

License

MIT

Unpacked Size

2.62 MB

Total Files

78

Last publish

Collaborators

  • hsiang