Socket
Socket
Sign inDemoInstall

good-listener

Package Overview
Dependencies
1
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.4 to 1.1.5

2

bower.json
{
"name": "good-listener",
"description": "A more versatile way of adding & removing event listeners",
"version": "1.1.3",
"version": "1.1.5",
"license": "MIT",

@@ -6,0 +6,0 @@ "main": "dist/good-listener.js",

@@ -172,3 +172,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.listen = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

if (!is.function(callback)) {
if (!is.fn(callback)) {
throw new TypeError('Third argument must be a Function');

@@ -249,2 +249,2 @@ }

},{"./is":4,"delegate":3}]},{},[5])(5)
});
});
{
"name": "good-listener",
"description": "A more versatile way of adding & removing event listeners",
"version": "1.1.4",
"version": "1.1.5",
"repository": "zenorocha/good-listener",

@@ -6,0 +6,0 @@ "main": "src/listen.js",

@@ -45,3 +45,3 @@ /**

*/
exports.function = function(value) {
exports.fn = function(value) {
var type = Object.prototype.toString.call(value);

@@ -48,0 +48,0 @@

@@ -22,3 +22,3 @@ var is = require('./is');

if (!is.function(callback)) {
if (!is.fn(callback)) {
throw new TypeError('Third argument must be a Function');

@@ -25,0 +25,0 @@ }

@@ -90,23 +90,23 @@ var is = require('../src/is');

describe('is.function', function() {
describe('is.fn', function() {
it('should be considered as function', function() {
assert.ok(is.function(function () {}));
assert.ok(is.fn(function () {}));
});
it('should not be considered as function', function() {
assert.notOk(is.function(undefined));
assert.notOk(is.function(null));
assert.notOk(is.function(false));
assert.notOk(is.function(true));
assert.notOk(is.function([]));
assert.notOk(is.function({}));
assert.notOk(is.function(/a/g));
assert.notOk(is.function(new RegExp('a', 'g')));
assert.notOk(is.function(new Date()));
assert.notOk(is.function(42));
assert.notOk(is.function(NaN));
assert.notOk(is.function(Infinity));
assert.notOk(is.function(new Number(42)));
assert.notOk(is.fn(undefined));
assert.notOk(is.fn(null));
assert.notOk(is.fn(false));
assert.notOk(is.fn(true));
assert.notOk(is.fn([]));
assert.notOk(is.fn({}));
assert.notOk(is.fn(/a/g));
assert.notOk(is.fn(new RegExp('a', 'g')));
assert.notOk(is.fn(new Date()));
assert.notOk(is.fn(42));
assert.notOk(is.fn(NaN));
assert.notOk(is.fn(Infinity));
assert.notOk(is.fn(new Number(42)));
});
});
});
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc