Socket
Socket
Sign inDemoInstall

haunted

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haunted - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

35

lib/page.js

@@ -20,2 +20,3 @@ var Spooky = require('spooky'),

self.finished = false;
self.wait = self.haunted.definition.wait || 0;

@@ -208,19 +209,23 @@ // set up our actions array

}
// use a 1s timeout in case a couple scripts are still being waited on
setTimeout(function() {
// set the final values for all queries
async.forEach(self.queries, function(query, done) {
self.haunted.storage.getValue(query.query, function(err, n) {
query.after = n;
query.test.occurred = n;
done(err);
if (self.queries.length > 0) {
// use a timeout in case a couple scripts are still being waited on
setTimeout(function() {
// set the final values for all queries
async.forEach(self.queries, function(query, done) {
self.haunted.storage.getValue(query.query, function(err, n) {
query.after = n;
query.test.occurred = n;
done(err);
});
}, function() {
self.finisher();
});
}, function() {
self.finisher();
});
}, 500)
}, self.wait)
} else {
self.finisher();
}
self.finished = true;

@@ -227,0 +232,0 @@ }

{
"name": "haunted",
"description": "A node module for validating site analytics",
"version": "0.2.1",
"version": "0.2.2",
"keywords": [

@@ -31,4 +31,4 @@ "node",

"readmeFilename": "README.md",
"_id": "haunted@0.2.1",
"_id": "haunted@0.2.2",
"_from": "haunted@0.2.x"
}

@@ -130,2 +130,5 @@ # Haunted

### wait (optional)
The number of milliseconds to wait before final (post-visit) check of datastore. Useful if you have delayed writes.
### sets (required)

@@ -132,0 +135,0 @@ In Haunted, a set is an array of URLs which are expected. You can define multiple sets (each of which has multiple URLs), and each page can reference multiple sets. Note that URLs will be naively partially matched, such that if a requested resource contains one of these URLs as a substring, it will be considered a match. For example:

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc