bind-event-listener
Advanced tools
Comparing version 0.3.0 to 1.0.0-alpha.1
@@ -1,2 +0,5 @@ | ||
import { bind } from './bind'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.bindAll = void 0; | ||
const bind_1 = require("./bind"); | ||
function toOptions(value) { | ||
@@ -26,6 +29,6 @@ if (typeof value === 'undefined') { | ||
} | ||
export function bindAll(target, bindings, sharedOptions) { | ||
function bindAll(target, bindings, sharedOptions) { | ||
const unbinds = bindings.map((original) => { | ||
const binding = getBinding(original, sharedOptions); | ||
return bind(target, binding); | ||
return bind_1.bind(target, binding); | ||
}); | ||
@@ -36,1 +39,2 @@ return function unbindAll() { | ||
} | ||
exports.bindAll = bindAll; |
@@ -1,2 +0,5 @@ | ||
export function bind(target, { type, listener, options }) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.bind = void 0; | ||
function bind(target, { type, listener, options }) { | ||
target.addEventListener(type, listener, options); | ||
@@ -7,1 +10,2 @@ return function unbind() { | ||
} | ||
exports.bind = bind; |
@@ -1,2 +0,6 @@ | ||
export { bind } from './bind'; | ||
export { bindAll } from './bind-all'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var bind_1 = require("./bind"); | ||
Object.defineProperty(exports, "bind", { enumerable: true, get: function () { return bind_1.bind; } }); | ||
var bind_all_1 = require("./bind-all"); | ||
Object.defineProperty(exports, "bindAll", { enumerable: true, get: function () { return bind_all_1.bindAll; } }); |
{ | ||
"name": "bind-event-listener", | ||
"version": "0.3.0", | ||
"version": "1.0.0-alpha.1", | ||
"private": false, | ||
@@ -20,3 +20,2 @@ "description": "Making binding and unbinding DOM events easier", | ||
"types": "dist/index.d.ts", | ||
"module": "dist/index.js", | ||
"sideEffects": false, | ||
@@ -23,0 +22,0 @@ "config": { |
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
13578
129