Comparing version 2.12.0-1 to 2.12.0
{ | ||
"name": "ralltiir", | ||
"version": "2.12.0-1", | ||
"version": "2.12.0", | ||
"discription": "前端极速浏览框架,目标是提升用户体验,提供沉浸式浏览方式。", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -26,2 +26,3 @@ /** | ||
register: register, | ||
postMessage: postMessage, | ||
unRegister: unRegister, | ||
@@ -69,2 +70,16 @@ isRegistered: isRegistered, | ||
function postMessage(msg, target) { | ||
assert(target, 'message target should be set explicitly'); | ||
serviceInstances.forEach(function (service) { | ||
if (!_.isFunction(service.onMessage)) { | ||
return; | ||
} | ||
if (target === '*' || target === service.name) { | ||
setTimeout(function () { | ||
service.onMessage(msg); | ||
}); | ||
} | ||
}); | ||
} | ||
function isRegistered(pathPattern) { | ||
@@ -71,0 +86,0 @@ return urlEntries.has(pathPattern); |
@@ -149,2 +149,13 @@ /** | ||
/** | ||
* Traverse all items available | ||
* | ||
* @param {Function} cb(value, key) The callback to iterate with | ||
*/ | ||
forEach: function (cb) { | ||
this.list.forEach(function (item) { | ||
cb(item.value, item.key); | ||
}); | ||
}, | ||
size: function () { | ||
@@ -151,0 +162,0 @@ return this.list.length; |
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
165990
39
3976
1
2