@tiermobility/tile38-ts
Advanced tools
Comparing version 2.0.0-beta.4 to 2.0.0-beta.5
@@ -97,7 +97,8 @@ "use strict"; | ||
const applyDefaults = (args) => { | ||
if (!args.length) | ||
return [{ port: 9851, lazyConnect: true }]; | ||
if (typeof args[0] === 'object') | ||
return [{ port: 9851, ...args[0], lazyConnect: true }]; | ||
return args; | ||
const options = args.find((arg) => typeof arg === 'object'); | ||
if (!options) | ||
return [...args, { port: 9851, lazyConnect: true }]; | ||
return args.map((arg) => typeof arg === 'object' | ||
? { port: 9851, ...arg, lazyConnect: true } | ||
: arg); | ||
}; | ||
@@ -104,0 +105,0 @@ const catchConnectionClosed = (error) => { |
{ | ||
"name": "@tiermobility/tile38-ts", | ||
"version": "2.0.0-beta.4", | ||
"version": "2.0.0-beta.5", | ||
"description": "A Node.js Tile38 client written in TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
196391
2300