Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

health-check-api

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

health-check-api - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

lib/healthCheck.js

@@ -1,1 +0,1 @@

"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(r,t,o){return t&&e(r.prototype,t),o&&e(r,o),r}}();Object.defineProperty(exports,"__esModule",{value:!0});var _repository=require("./repository"),_repository2=_interopRequireDefault(_repository),_healthCheckCore=require("health-check-core"),_healthCheckCore2=_interopRequireDefault(_healthCheckCore),HealthCheck=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"do",value:function(e){return new Promise(function(r,t){var o={fnIsHealthGood:function(e){return null===e.error},fnName:function(e){return e.configuration.method+":"+e.configuration.url},fnErrorMessage:function(e){return e.error.message}};_healthCheckCore2["default"]["do"](e,_repository2["default"].test,o).then(function(e){r(e)})["catch"](function(e){t(e)})})}}]),e}();exports["default"]=HealthCheck,HealthCheck["do"]({url:"htp://globo.com",method:"GET",expectedStatusCode:300}).then(function(e){return console.log(e)})["catch"](function(e){return console.log(e)});
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();Object.defineProperty(exports,"__esModule",{value:!0});var _repository=require("./repository"),_repository2=_interopRequireDefault(_repository),_healthCheckCore=require("health-check-core"),_healthCheckCore2=_interopRequireDefault(_healthCheckCore),HealthCheck=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"do",value:function(e){return new Promise(function(r,t){var n={fnIsHealthGood:function(e){return null===e.error},fnName:function(e){return e.configuration.method+":"+e.configuration.url},fnErrorMessage:function(e){return e.error.message}};_healthCheckCore2["default"]["do"](e,_repository2["default"].test,n).then(function(e){r(e)})["catch"](function(e){t(e)})})}}]),e}();exports["default"]=HealthCheck;

@@ -8,3 +8,3 @@ {

},
"version": "0.0.1",
"version": "0.0.2",
"license": "MIT",

@@ -11,0 +11,0 @@ "author": {

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