Comparing version 0.4.1 to 0.4.2
@@ -0,1 +1,6 @@ | ||
## v0.4.2 - Sep 20 2019 | ||
+ Dependency updates. | ||
+ Fixes new linting errors. | ||
+ New repository url. | ||
## v0.4.1 - Dec 10 2018 | ||
@@ -2,0 +7,0 @@ + Dependency updates to address https://github.com/dominictarr/event-stream/issues/116 |
@@ -61,2 +61,6 @@ 'use strict'; | ||
function hasOwnProperty(item, key) { | ||
return Object.prototype.hasOwnProperty.call(item, key); | ||
} | ||
/** | ||
@@ -81,3 +85,3 @@ * @summary Set global configuration. | ||
for (var key in userConfig) { | ||
if (config.hasOwnProperty(key)) { | ||
if (hasOwnProperty(config, key)) { | ||
config[key] = userConfig[key]; | ||
@@ -118,3 +122,3 @@ } | ||
for (var _key2 in extensions) { | ||
if (result.hasOwnProperty(_key2)) { | ||
if (hasOwnProperty(result, _key2)) { | ||
result[_key2] = extensions[_key2]; | ||
@@ -296,4 +300,4 @@ } | ||
var defVal = typeof sub.default === 'undefined' ? topicConfig.default : sub.default; | ||
var eventOnly = sub.hasOwnProperty('eventOnly') ? sub.eventOnly : topicConfig.eventOnly; | ||
var allowRepeats = sub.hasOwnProperty('allowRepeats') ? sub.allowRepeats : topicConfig.allowRepeats; | ||
var eventOnly = hasOwnProperty(sub, 'eventOnly') ? sub.eventOnly : topicConfig.eventOnly; | ||
var allowRepeats = hasOwnProperty(sub, 'allowRepeats') ? sub.allowRepeats : topicConfig.allowRepeats; | ||
var value = eventOnly ? topic : valueOrDefault(payload, defVal); | ||
@@ -424,3 +428,3 @@ | ||
var topicConfig = getTopicConfig(item.topic); | ||
var doPrime = subscription.hasOwnProperty('doPrime') ? subscription.doPrime : topicConfig.doPrime; | ||
var doPrime = hasOwnProperty(subscription, 'doPrime') ? subscription.doPrime : topicConfig.doPrime; | ||
@@ -460,3 +464,3 @@ if (doPrime && (topicConfig.eventOnly || isSet(item.val))) { | ||
function clear(topic) { | ||
if (store.hasOwnProperty(topic)) { | ||
if (hasOwnProperty(store, topic)) { | ||
publish(topic, null); | ||
@@ -463,0 +467,0 @@ } |
{ | ||
"name": "pubst", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "A slightly opinionated pub/sub event emitter for JavaScript.", | ||
@@ -17,3 +17,3 @@ "main": "lib/pubst.js", | ||
"type": "git", | ||
"url": "git+https://github.com/VoltiSubito/pubst.git" | ||
"url": "git+https://github.com/JasonTypesCodes/pubst.git" | ||
}, | ||
@@ -34,5 +34,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/VoltiSubito/pubst/issues" | ||
"url": "https://github.com/JasonTypesCodes/pubst/issues" | ||
}, | ||
"homepage": "https://github.com/VoltiSubito/pubst#readme", | ||
"homepage": "https://github.com/JasonTypesCodes/pubst#readme", | ||
"devDependencies": { | ||
@@ -43,10 +43,10 @@ "babel-cli": "6.26.0", | ||
"clear-require": "3.0.0", | ||
"eslint": "5.10.0", | ||
"jsdoc": "3.5.5", | ||
"mocha": "5.2.0", | ||
"eslint": "6.4.0", | ||
"jsdoc": "3.6.3", | ||
"mocha": "6.2.0", | ||
"npm-run-all": "4.1.5", | ||
"shx": "0.3.2", | ||
"sinon": "7.2.0", | ||
"sinon": "7.4.2", | ||
"sinon-chai": "3.3.0" | ||
} | ||
} |
# Pubst | ||
[![Build Status](https://travis-ci.org/VoltiSubito/pubst.svg?branch=main)](https://travis-ci.org/VoltiSubito/pubst) | ||
[![Build Status](https://travis-ci.org/JasonTypesCodes/pubst.svg?branch=main)](https://travis-ci.org/JasonTypesCodes/pubst) | ||
@@ -5,0 +5,0 @@ Pubst is a slightly opinionated pub/sub library for JavaScript. |
@@ -51,2 +51,6 @@ /** | ||
function hasOwnProperty(item, key) { | ||
return Object.prototype.hasOwnProperty.call(item, key); | ||
} | ||
/** | ||
@@ -69,3 +73,3 @@ * @summary Set global configuration. | ||
for (const key in userConfig) { | ||
if (config.hasOwnProperty(key)) { | ||
if (hasOwnProperty(config, key)) { | ||
config[key] = userConfig[key]; | ||
@@ -110,3 +114,3 @@ } | ||
for (const key in extensions) { | ||
if (result.hasOwnProperty(key)) { | ||
if (hasOwnProperty(result, key)) { | ||
result[key] = extensions[key]; | ||
@@ -283,4 +287,4 @@ } | ||
const defVal = typeof sub.default === 'undefined' ? topicConfig.default : sub.default; | ||
const eventOnly = sub.hasOwnProperty('eventOnly') ? sub.eventOnly : topicConfig.eventOnly; | ||
const allowRepeats = sub.hasOwnProperty('allowRepeats') ? sub.allowRepeats : topicConfig.allowRepeats; | ||
const eventOnly = hasOwnProperty(sub, 'eventOnly') ? sub.eventOnly : topicConfig.eventOnly; | ||
const allowRepeats = hasOwnProperty(sub, 'allowRepeats') ? sub.allowRepeats : topicConfig.allowRepeats; | ||
const value = eventOnly ? topic : valueOrDefault(payload, defVal); | ||
@@ -409,3 +413,3 @@ | ||
const topicConfig = getTopicConfig(item.topic); | ||
const doPrime = subscription.hasOwnProperty('doPrime') ? subscription.doPrime : topicConfig.doPrime; | ||
const doPrime = hasOwnProperty(subscription, 'doPrime') ? subscription.doPrime : topicConfig.doPrime; | ||
@@ -445,3 +449,3 @@ if (doPrime && (topicConfig.eventOnly || isSet(item.val))) { | ||
function clear(topic) { | ||
if (store.hasOwnProperty(topic)) { | ||
if (hasOwnProperty(store, topic)) { | ||
publish(topic, null); | ||
@@ -448,0 +452,0 @@ } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
85614
1688
1