42 lines
705 B
JavaScript
42 lines
705 B
JavaScript
|
|
/*
|
||
|
|
|
||
|
|
Copyright (c) 2020, 2023, The Unified Company.
|
||
|
|
|
||
|
|
This code is part of Unify.
|
||
|
|
|
||
|
|
This program is free software; you can redistribute it and/or modify
|
||
|
|
it under the terms of the ESA Software Community License - Strong Copyleft LICENSE,
|
||
|
|
as published by the ESA.
|
||
|
|
See the ESA Software Community License - Strong Copyleft LICENSE, for more details.
|
||
|
|
|
||
|
|
https://unifyjs.org
|
||
|
|
|
||
|
|
*/
|
||
|
|
|
||
|
|
class shared {
|
||
|
|
|
||
|
|
get() {
|
||
|
|
|
||
|
|
if( typeof document == "undefined" && typeof global != "undefined" ){
|
||
|
|
|
||
|
|
return global;
|
||
|
|
|
||
|
|
} else if( typeof document != "undefined" ) {
|
||
|
|
|
||
|
|
return document;
|
||
|
|
|
||
|
|
} else{
|
||
|
|
|
||
|
|
return {};
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
var object = new shared();
|
||
|
|
|
||
|
|
export default object.get();
|
||
|
|
|