Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uni/env

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uni/env - npm Package Compare versions

Comparing version 1.1.0-beta.0 to 1.1.0-beta.1

2

dist/index.js

@@ -1,1 +0,1 @@

!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.uni_env=e():n.uni_env=e()}(window,(function(){return function(n){var e={};function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var i in n)t.d(r,i,function(e){return n[e]}.bind(null,i));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){n.exports=t(1)},function(n,e,t){"use strict";t.r(e),function(n,r){t.d(e,"isWeb",(function(){return i})),t.d(e,"isNode",(function(){return o})),t.d(e,"isWeex",(function(){return u})),t.d(e,"isKraken",(function(){return c})),t.d(e,"isMiniApp",(function(){return f})),t.d(e,"isByteDanceMicroApp",(function(){return s})),t.d(e,"isBaiduSmartProgram",(function(){return a})),t.d(e,"isKuaiShouMiniProgram",(function(){return d})),t.d(e,"isWeChatMiniProgram",(function(){return l})),t.d(e,"isQuickApp",(function(){return p})),t.d(e,"isPHA",(function(){return y})),t.d(e,"isWindVane",(function(){return m})),t.d(e,"isFRM",(function(){return h}));var i="undefined"!=typeof window&&"onload"in window,o=void 0!==n&&!(!n.versions||!n.versions.node),u="undefined"!=typeof WXEnvironment&&"Web"!==WXEnvironment.platform,c="undefined"!=typeof __kraken__,f="undefined"!=typeof my&&null!==my&&void 0!==my.alert,s="undefined"!=typeof tt&&null!==tt&&void 0!==tt.showToast,a="undefined"!=typeof swan&&null!==swan&&void 0!==swan.showToast,d="undefined"!=typeof ks&&null!==ks&&void 0!==ks.showToast,l=!s&&"undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram),p=null!=r&&void 0!==r.callNative&&!u,y=i&&"object"==typeof pha,m=i&&"undefined"!=typeof WindVane&&void 0!==WindVane.call,h=f&&i&&my.isFRM;e.default={isWeb:i,isNode:o,isWeex:u,isKraken:c,isMiniApp:f,isByteDanceMicroApp:s,isBaiduSmartProgram:a,isKuaiShouMiniProgram:d,isWeChatMiniProgram:l,isQuickApp:p,isPHA:y,isWindVane:m,isFRM:h}}.call(this,t(2),t(3))},function(n,e){var t,r,i=n.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(n){if(t===setTimeout)return setTimeout(n,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(n,0);try{return t(n,0)}catch(e){try{return t.call(null,n,0)}catch(e){return t.call(this,n,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(n){t=o}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(n){r=u}}();var f,s=[],a=!1,d=-1;function l(){a&&f&&(a=!1,f.length?s=f.concat(s):d=-1,s.length&&p())}function p(){if(!a){var n=c(l);a=!0;for(var e=s.length;e;){for(f=s,s=[];++d<e;)f&&f[d].run();d=-1,e=s.length}f=null,a=!1,function(n){if(r===clearTimeout)return clearTimeout(n);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(n);try{r(n)}catch(e){try{return r.call(null,n)}catch(e){return r.call(this,n)}}}(n)}}function y(n,e){this.fun=n,this.array=e}function m(){}i.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];s.push(new y(n,e)),1!==s.length||a||c(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(){return[]},i.binding=function(){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(n,e){var t=function(){return this}();try{t=t||new Function("return this")()}catch(n){"object"==typeof window&&(t=window)}n.exports=t}])}));
!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.uni_env=e():n.uni_env=e()}(window,(function(){return function(n){var e={};function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var i in n)t.d(r,i,function(e){return n[e]}.bind(null,i));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){n.exports=t(1)},function(n,e,t){"use strict";t.r(e),function(n,r){t.d(e,"isWeb",(function(){return i})),t.d(e,"isNode",(function(){return o})),t.d(e,"isWeex",(function(){return u})),t.d(e,"isKraken",(function(){return c})),t.d(e,"isMiniApp",(function(){return f})),t.d(e,"isByteDanceMicroApp",(function(){return s})),t.d(e,"isBaiduSmartProgram",(function(){return a})),t.d(e,"isKuaiShouMiniProgram",(function(){return d})),t.d(e,"isWeChatMiniProgram",(function(){return l})),t.d(e,"isQuickApp",(function(){return p})),t.d(e,"isPHA",(function(){return y})),t.d(e,"isFRM",(function(){return m})),t.d(e,"isWindVane",(function(){return v}));var i="undefined"!=typeof window&&"onload"in window,o=void 0!==n&&!(!n.versions||!n.versions.node),u="undefined"!=typeof WXEnvironment&&"Web"!==WXEnvironment.platform,c="undefined"!=typeof __kraken__,f="undefined"!=typeof my&&null!==my&&void 0!==my.alert,s="undefined"!=typeof tt&&null!==tt&&void 0!==tt.showToast,a="undefined"!=typeof swan&&null!==swan&&void 0!==swan.showToast,d="undefined"!=typeof ks&&null!==ks&&void 0!==ks.showToast,l=!s&&"undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram),p=null!=r&&void 0!==r.callNative&&!u,y=i&&"object"==typeof pha,m=f&&i&&my.isFRM,h="object"==typeof navigator?navigator.userAgent||navigator.swuserAgent:"",v=/.+AliApp\((\w+)\/((?:\d+\.)+\d+)\).* .*(WindVane)(?:\/((?:\d+\.)+\d+))?.*/.test(h);e.default={isWeb:i,isNode:o,isWeex:u,isKraken:c,isMiniApp:f,isByteDanceMicroApp:s,isBaiduSmartProgram:a,isKuaiShouMiniProgram:d,isWeChatMiniProgram:l,isQuickApp:p,isPHA:y,isWindVane:v,isFRM:m}}.call(this,t(2),t(3))},function(n,e){var t,r,i=n.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(n){if(t===setTimeout)return setTimeout(n,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(n,0);try{return t(n,0)}catch(e){try{return t.call(null,n,0)}catch(e){return t.call(this,n,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(n){t=o}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(n){r=u}}();var f,s=[],a=!1,d=-1;function l(){a&&f&&(a=!1,f.length?s=f.concat(s):d=-1,s.length&&p())}function p(){if(!a){var n=c(l);a=!0;for(var e=s.length;e;){for(f=s,s=[];++d<e;)f&&f[d].run();d=-1,e=s.length}f=null,a=!1,function(n){if(r===clearTimeout)return clearTimeout(n);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(n);try{r(n)}catch(e){try{return r.call(null,n)}catch(e){return r.call(this,n)}}}(n)}}function y(n,e){this.fun=n,this.array=e}function m(){}i.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];s.push(new y(n,e)),1!==s.length||a||c(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(){return[]},i.binding=function(){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(n,e){var t=function(){return this}();try{t=t||new Function("return this")()}catch(n){"object"==typeof window&&(t=window)}n.exports=t}])}));

@@ -16,4 +16,5 @@ export var isWeb = typeof window !== 'undefined' && 'onload' in window;

export var isPHA = isWeb && typeof pha === 'object';
export var isWindVane = isWeb && typeof WindVane !== 'undefined' && typeof WindVane.call !== 'undefined';
export var isFRM = isMiniApp && isWeb && my.isFRM;
var ua = typeof navigator === 'object' ? navigator.userAgent || navigator.swuserAgent : '';
export var isWindVane = /.+AliApp\((\w+)\/((?:\d+\.)+\d+)\).* .*(WindVane)(?:\/((?:\d+\.)+\d+))?.*/.test(ua);
export default {

@@ -20,0 +21,0 @@ isWeb: isWeb,

@@ -31,6 +31,7 @@ "use strict";

exports.isPHA = isPHA;
var isWindVane = isWeb && typeof WindVane !== 'undefined' && typeof WindVane.call !== 'undefined';
exports.isWindVane = isWindVane;
var isFRM = isMiniApp && isWeb && my.isFRM;
exports.isFRM = isFRM;
var ua = typeof navigator === 'object' ? navigator.userAgent || navigator.swuserAgent : '';
var isWindVane = /.+AliApp\((\w+)\/((?:\d+\.)+\d+)\).* .*(WindVane)(?:\/((?:\d+\.)+\d+))?.*/.test(ua);
exports.isWindVane = isWindVane;
var _default = {

@@ -37,0 +38,0 @@ isWeb: isWeb,

@@ -1,1 +0,1 @@

{"name":"@uni/env","version":"1.1.0-beta.0","description":"","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"repository":{"type":"git","url":"git@github.com:raxjs/universal-api.git"},"license":"BSD-3-Clause","author":"rax"}
{"name":"@uni/env","version":"1.1.0-beta.1","description":"","main":"lib/index.js","module":"es/index.js","unpkg":"dist/index.js","typings":"types/index.d.ts","sideEffects":false,"repository":{"type":"git","url":"git@github.com:raxjs/universal-api.git"},"license":"BSD-3-Clause","author":"rax"}

@@ -12,4 +12,4 @@ export declare const isWeb: boolean;

export declare const isPHA: boolean;
export declare const isFRM: any;
export declare const isWindVane: boolean;
export declare const isFRM: any;
declare const _default: {

@@ -16,0 +16,0 @@ isWeb: boolean;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc