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

server-reach-by-image

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

server-reach-by-image - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

6

.eslintrc.js

@@ -8,5 +8,7 @@ module.exports = {

named: 'never'
}],
curly: ['error', 'multi']
}]
},
env: {
jest: true
}
};

@@ -19,4 +19,6 @@ const defaults = {

return new Promise((resolve, reject) => {
/* eslint-disable prefer-promise-reject-errors */
const fail = msg => reject({ msg: new Error(msg), status: false });
/* eslint-disable no-undef */
const img = new Image();

@@ -32,11 +34,14 @@ img.onload = () => resolve({ msg: null, status: true });

validateParams() {
if (!this.options.url || !this.options.imgUrl)
if (!this.options.url || !this.options.imgUrl) {
throw new Error(errors.param_missing_urls);
}
this.options.url = this.options.url.replace(/\/+$/, '');
if (!this.options.imgUrl.startsWith('/'))
if (!this.options.imgUrl.startsWith('/')) {
this.options.imgUrl = `/${this.options.imgUrl}`;
}
if (!Number.isInteger(this.options.timeout))
if (!Number.isInteger(this.options.timeout)) {
throw new Error(errors.param_timeout_integer);
}
}

@@ -43,0 +48,0 @@ }

{
"name": "server-reach-by-image",
"version": "1.0.3",
"version": "1.0.4",
"description": "Check can you reach a specific server (address or ip) by using image hosted on that server.",

@@ -8,4 +8,4 @@ "main": "index.js",

"release": "np --yolo",
"test": "node_modules/.bin/jest",
"lint": "eslint"
"test": "jest",
"lint": "eslint ."
},

@@ -12,0 +12,0 @@ "repository": {

# Server Reach By Image
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)
[![license](https://img.shields.io/github/license/marinko-peso/shamus.svg)](https://github.com/marinko-peso/shamus/blob/master/LICENSE)
![package version](https://img.shields.io/npm/v/server-reach-by-image.svg)
[![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg)](https://github.com/Flet/semistandard)
[![package version](https://img.shields.io/npm/v/server-reach-by-image.svg)](https://npm.im/server-reach-by-image)

@@ -16,3 +17,3 @@ Check can you reach a specific server (address or ip) by using image hosted on that server.

```ssh
npm install server-reach-by-image
npm i server-reach-by-image
```

@@ -19,0 +20,0 @@

Sorry, the diff of this file is not supported yet

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