Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

boolean.js 539B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.boolean = void 0;
  4. const boolean = function (value) {
  5. switch (Object.prototype.toString.call(value)) {
  6. case '[object String]':
  7. return ['true', 't', 'yes', 'y', 'on', '1'].includes(value.trim().toLowerCase());
  8. case '[object Number]':
  9. return value.valueOf() === 1;
  10. case '[object Boolean]':
  11. return value.valueOf();
  12. default:
  13. return false;
  14. }
  15. };
  16. exports.boolean = boolean;