env-utils.js 235 B

1234567891011121314151617
  1. /**
  2. * convert to boolean
  3. *
  4. * @param {string} value
  5. * @returns {boolean}
  6. * @memberof envUtils
  7. */
  8. function toBoolean(value) {
  9. return /^(true|1)$/i.test(value);
  10. }
  11. /**
  12. * @namespace envUtils
  13. */
  14. module.exports = {
  15. toBoolean,
  16. };