mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-18 09:35:50 +00:00
Use @types/node@8.0.0 to validate (and fix) small node 8 api issues
This commit is contained in:
parent
916d03f879
commit
f0a24b8f65
9 changed files with 49 additions and 43 deletions
|
|
@ -85,6 +85,8 @@ class GameResolver {
|
|||
for (const one of str.split(',')) {
|
||||
const equals = one.indexOf('=');
|
||||
const key = equals === -1 ? one : one.substr(0,equals);
|
||||
|
||||
/** @type {string|number|boolean} */
|
||||
let value = equals === -1 ? '' : one.substr(equals+1);
|
||||
|
||||
if(value === 'true' || value === '') value = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue