New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

json-response-checker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-response-checker

Check the JSON response of a URL once or continuously with a timeout (e.g. to verify a deployment)

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

node-json-response-checker

Check the JSON response of a URL once or continuously with a timeout (e.g. to verify a deployment)

See test.js and index.js for more information

Gulp Example

var gulp = require('gulp');
var JSONResponseChecker = require('json-response-checker');

gulp.task('verify:version', function(done) {
  var maxTimeout = 60 * 1000;
  var url = process.env.VERSION_URL
  var expected = process.env.COMMIT_HASH
  function getActual(obj) { return obj.commit.hash }
  var checker = new JSONResponseChecker(url, expected, getActual)
  checker.checkContinuously(maxTimeout, done);
})

You can run use this to verify deployment by having your CI server run a command like this:

COMMIT_HASH=407b2ca49870a35e1aa487821735906935de7a9c VERSION_URL="https://example.com/version" gulp verify:version

FAQs

Package last updated on 22 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts