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

docker-host

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-host - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

6

index.js
module.exports = function(remote) {
if (remote && (remote.host || remote.socketPath)) return remote
if (remote && typeof remote === 'object') {
if (remote.socketPath) return {socketPath:remote.socketPath, protocol:'unix:'}
if (remote.host || remote.port) return {host:remote.host || 'localhost', port:remote.port || 2375, protocol:remote.protocol || 'http:'}
remote = null
}

@@ -4,0 +8,0 @@ if (!remote) remote = process.env.DOCKER_HOST || 'unix:///var/run/docker.sock'

2

package.json
{
"name": "docker-host",
"version": "2.3.0",
"version": "2.3.1",
"description": "Tiny module that converts a host to docker (usually $DOCKER_HOST) to a standard http url",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -39,4 +39,5 @@ var tape = require('tape')

tape('support object shorthand', function(t) {
t.same(host({host:'localhost'}), {host:'localhost', port:2375, protocol:'http:'})
t.same(host(host(':2375')), {host:'localhost', port:2375, protocol:'http:'})
t.end()
})
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