Comparing version 2.0.0 to 2.0.1
/*! | ||
* uevent (v2.0.0) | ||
* @copyright 2015-2019 Damien "Mistic" Sorel <contact@git.strangeplanet.fr> | ||
* uevent (v2.0.1) | ||
* @copyright 2015-2021 Damien "Mistic" Sorel <contact@git.strangeplanet.fr> | ||
* @licence MIT | ||
@@ -9,4 +9,4 @@ */ | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = global || self, factory(global.uEvent = {})); | ||
}(this, function (exports) { 'use strict'; | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.uEvent = {})); | ||
}(this, (function (exports) { 'use strict'; | ||
@@ -21,5 +21,3 @@ var returnTrue = function returnTrue() { | ||
var Event = | ||
/*#__PURE__*/ | ||
function () { | ||
var Event = /*#__PURE__*/function () { | ||
/** | ||
@@ -77,5 +75,3 @@ * @param {*} target | ||
var EventEmitter = | ||
/*#__PURE__*/ | ||
function () { | ||
var EventEmitter = /*#__PURE__*/function () { | ||
function EventEmitter() {} | ||
@@ -317,4 +313,4 @@ | ||
exports.EventEmitter = uEvent_1; | ||
exports.default = uEvent; | ||
exports.EventEmitter = uEvent_1; | ||
exports.mixin = uEvent_2; | ||
@@ -324,3 +320,3 @@ | ||
})); | ||
}))); | ||
//# sourceMappingURL=browser.js.map |
{ | ||
"name": "uevent", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Event emitter micro library", | ||
@@ -8,3 +8,9 @@ "main": "index.js", | ||
"types": "types.d.ts", | ||
"author": { | ||
"files": [ | ||
"src/", | ||
"browser.js", | ||
"browser.js.map", | ||
"types.d.ts" | ||
], | ||
"author": { | ||
"name": "Damien \"Mistic\" Sorel", | ||
@@ -28,13 +34,13 @@ "email": "contact@git.strangeplanet.fr", | ||
"devDependencies": { | ||
"@babel/core": "^7.2.2", | ||
"@babel/preset-env": "^7.2.3", | ||
"mocha": "^5.2.0", | ||
"rollup": "^1.0.0", | ||
"rollup-plugin-babel": "^4.2.0", | ||
"rollup-plugin-commonjs": "^9.2.0" | ||
"@babel/core": "^7.2.2", | ||
"@babel/preset-env": "^7.2.3", | ||
"mocha": "^8.0.1", | ||
"rollup": "^2.0.2", | ||
"rollup-plugin-babel": "^4.2.0", | ||
"rollup-plugin-commonjs": "^10.0.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha tests/*", | ||
"compile": "rollup --config rollup.config.js" | ||
"test": "mocha tests/*", | ||
"compile": "rollup --config rollup.config.js" | ||
} | ||
} |
@@ -5,4 +5,4 @@ # uEvent | ||
[![jsDelivr CDN](https://data.jsdelivr.com/v1/package/npm/uevent/badge)](https://www.jsdelivr.com/package/npm/uevent) | ||
[![Build Status](https://img.shields.io/travis/mistic100/uEvent/master.svg?style=flat-square)](https://travis-ci.org/mistic100/uEvent) | ||
[![Dependencies Status](https://david-dm.org/mistic100/uEvent/status.svg?style=flat-square)](https://david-dm.org/mistic100/uEvent) | ||
[![GZIP size](https://flat.badgen.net/bundlephobia/minzip/uevent)](https://bundlephobia.com/result?p=uevent) | ||
[![Build Status](https://github.com/mistic100/uEvent/workflows/CI/badge.svg)](https://github.com/mistic100/uEvent/actions) | ||
@@ -17,4 +17,3 @@ _uEvent_ is a event emitter library which provides the [observer pattern](http://en.wikipedia.org/wiki/Observer_pattern) to javascript objects. | ||
* jQuery-like API (`on`, `off`, `trigger`) | ||
* Once support | ||
* jQuery-like API (`on`, `off`, `once`, trigger`) | ||
* Value modifier support | ||
@@ -39,3 +38,5 @@ * **prevent default** and **stop propagation** patterns | ||
```js | ||
const obj = new uevent.EventEmitter(); | ||
import { EventEmitter } from 'uevent'; | ||
const obj = new EventEmitter(); | ||
``` | ||
@@ -46,3 +47,3 @@ | ||
```js | ||
class Manager extends uevent.EventEmitter { | ||
class Manager extends EventEmitter { | ||
@@ -57,5 +58,7 @@ } | ||
```js | ||
import { mixin as eventEmitterMixin } from 'uevent'; | ||
const obj = {}; | ||
uevent.mixin(obj); | ||
eventEmitterMixin(obj); | ||
``` | ||
@@ -62,0 +65,0 @@ |
@@ -50,11 +50,11 @@ declare namespace uevent { | ||
} | ||
interface uEvent { | ||
EventEmitter: EventEmitter; | ||
mixin: (target: any) => void; | ||
} | ||
} | ||
declare const uevent: uevent.uEvent; | ||
declare const uevent: { | ||
EventEmitter: { | ||
new(): uevent.EventEmitter; | ||
}; | ||
mixin: (target: any) => void; | ||
}; | ||
export = uevent; | ||
export as namespace uevent; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
39387
202
0
561