forked from FOSS/BangleApps
Allow suncalc to be exported via `globalThis`
parent
a00f1b6568
commit
4a7738cebc
|
@ -92,6 +92,7 @@ module.exports = {
|
|||
"getSerial": "readonly",
|
||||
"getTime": "readonly",
|
||||
"global": "readonly",
|
||||
"globalThis": "writable",
|
||||
"HIGH": "readonly",
|
||||
"I2C1": "readonly",
|
||||
"Infinity": "readonly",
|
||||
|
|
|
@ -336,6 +336,6 @@ SunCalc.getMoonTimes = function (date, lat, lng, inUTC) {
|
|||
// export as Node module / AMD module / browser variable
|
||||
if (typeof exports === 'object' && typeof module !== 'undefined') module.exports = SunCalc;
|
||||
//else if (typeof define === 'function' && define.amd) define(SunCalc);
|
||||
//else window.SunCalc = SunCalc;
|
||||
else globalThis.SunCalc = SunCalc;
|
||||
|
||||
}());
|
||||
|
|
Loading…
Reference in New Issue