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

nat-upnp

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nat-upnp - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

7

lib/nat-upnp/client.js

@@ -18,2 +18,3 @@ var nat = require('../nat-upnp');

if (typeof addr === 'number') return { port: addr };
if (typeof addr === 'string' && !isNaN(addr)) return { port: Number(addr) };
if (typeof addr === 'object') return addr;

@@ -37,2 +38,5 @@

var ports = normalizeOptions(options);
var ttl = 60 * 30;
if (typeof options.ttl === 'number') { ttl = options.ttl; }
if (typeof options.ttl === 'string' && !isNaN(options.ttl)) { ttl = Number(options.ttl); }

@@ -48,4 +52,3 @@ gateway.run('AddPortMapping', [

[ 'NewPortMappingDescription', options.description || 'node:nat:upnp' ],
[ 'NewLeaseDuration', typeof options.ttl === 'number' ?
options.ttl : 60 * 30 ]
[ 'NewLeaseDuration', ttl ]
], callback);

@@ -52,0 +55,0 @@ });

{
"name": "nat-upnp",
"version": "1.0.1",
"version": "1.0.2",
"main": "lib/nat-upnp",

@@ -5,0 +5,0 @@ "author": "Fedor Indutny <fedor@indutny.com>",

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