0.0.2 • Published 3 years ago

@mini-dev/vendor v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

miniapp vendor

对各个平台的小程序全局对象的替换,具体代码如下:

if (typeof wx === 'object') {
    return wx;
} else if (typeof qq === 'object') {
    return qq;
} else if (typeof my === 'object') {
    return my;
} else if (typeof swan === 'object') {
    return swan;
} else if (typeof tt === 'object') {
    return tt;
} else {
    return null;
}