Alexandre Bodin 86312ecbaf Add content-type kind property
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-30 14:50:45 +02:00

17 lines
344 B
JavaScript

'use strict';
const isTruthyEnvVar = val => {
if (val === null || val === undefined) return false;
if (val === true) return true;
if (val.toString().toLowerCase() === 'true') return true;
if (val.toString().toLowerCase() === 'false') return false;
if (val === 1) return true;
return false;
};
module.exports = isTruthyEnvVar;