New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tiny-emitter

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiny-emitter - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

bower.json

2

index.js

@@ -45,3 +45,3 @@ function Emitter () {

if (!evts) this;
if (!evts) return this;

@@ -48,0 +48,0 @@ if (!callback) {

{
"name": "tiny-emitter",
"version": "0.1.3",
"description": "A tiny (less than 500 bytes) event emitter library",
"version": "0.1.4",
"description": "A tiny (less than 1k) event emitter library",
"main": "index.js",
"scripts": {
"test": "node test/index.js | node_modules/.bin/tspec"
"test": "node test/index.js | node_modules/.bin/tspec",
"bundle": "node_modules/.bin/browserify index.js > dist/tinyemitter.js -s TinyEmitter && echo 'Bundled'",
"minify": "node_modules/.bin/uglifyjs dist/tinyemitter.js -o dist/tinyemitter.min.js && echo 'Minified'",
"build": "npm test && npm run bundle && npm run minify"
},

@@ -28,4 +31,6 @@ "repository": {

"tape": "~2.3.2",
"tap-spec": "~0.1.1"
"tap-spec": "~0.1.1",
"browserify": "~3.18.0",
"uglify-js": "~2.4.8"
}
}
# tiny-emitter
A tiny (less than 500 bytes) event emitter library. Works with [Browserify](http://browserify.org).
A tiny (less than 1k) event emitter library. Works in the browser, in Node, and with [Browserify](http://browserify.org).
## Install
Node and Browserify
```

@@ -11,4 +13,16 @@ npm install tiny-emitter --save

Browser
```
bower install tiny-emitter --save
```
```html
<script src="bower_compontents/tiny-emitter/dist/tinyemitter.min.js"></script>
```
## Usage
Node and Browserify
```js

@@ -24,3 +38,12 @@ var Emitter = require('tiny-emitter');

```
Browser
```js
var emitter = new TinyEmitter();
emitter.on('some-event', someCallback);
emitter.emit('some-event');
```
## Instance Methods

@@ -57,8 +80,17 @@

* `arguments...` - any number of arguments to pass to the event subscribers
## Test and Build
## Run Tests
Build (Tests, Browserifies, and minifies)
```
npm install
npm run build
```
Test
```
npm install
npm test
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc