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