util.js 567 B

12345678910111213141516171819202122
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.isGMT = exports.dnsLookup = void 0;
  4. const dns_1 = require("dns");
  5. function dnsLookup(host, opts) {
  6. return new Promise((resolve, reject) => {
  7. (0, dns_1.lookup)(host, opts, (err, res) => {
  8. if (err) {
  9. reject(err);
  10. }
  11. else {
  12. resolve(res);
  13. }
  14. });
  15. });
  16. }
  17. exports.dnsLookup = dnsLookup;
  18. function isGMT(v) {
  19. return v === 'GMT';
  20. }
  21. exports.isGMT = isGMT;
  22. //# sourceMappingURL=util.js.map