New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wxobs/miniprogram-helper

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wxobs/miniprogram-helper - npm Package Compare versions

Comparing version 0.6.5 to 0.6.6

2

dist/index.js

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e,o=function(){return o=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};function n(t,e,o,n){return new(o||(o=Promise))((function(r,i){function s(t){try{u(n.next(t))}catch(t){i(t)}}function l(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(s,l)}u((n=n.apply(t,e||[])).next())}))}function r(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=l(0),s.throw=l(1),s.return=l(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function l(l){return function(u){return function(l){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&l[0]?n.return:l[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,l[1])).done)return r;switch(n=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(6===l[0]&&i.label<r[1]){i.label=r[1],r=l;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(l);break}r[2]&&i.ops.pop(),i.trys.pop();continue}l=e.call(t,i)}catch(t){l=[6,t],n=0}finally{o=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,u])}}}"function"==typeof SuppressedError&&SuppressedError,function(t){t.NotSetup="NotSetup",t.SettingUp="SettingUp",t.WaitingForFirstReport="WaitingForFirstReport",t.Collecting="Collecting",t.TearingDown="TearingDown"}(t||(t={})),function(t){t[t.BOOLEAN=1]="BOOLEAN",t[t.STRING=2]="STRING",t[t.NUMBER=3]="NUMBER",t[t.JSON=4]="JSON"}(e||(e={}));var i,s,l,u,a,c,d,v,f,p,w,b,x,g,_,h,y,S,m,I,F,O,C=new Promise((function(e){var o=setInterval((function(){var n,r;if(void 0===(null===(r=null===(n=wx.cloud)||void 0===n?void 0:n.obs)||void 0===r?void 0:r.getStatus))return e(!0),void clearInterval(o);R()===t.Collecting&&(clearInterval(o),e(!0))}),100)}));function N(t){var e;return n(this,void 0,void 0,(function(){var o,n;return r(this,(function(r){switch(r.label){case 0:return void 0===(null===(e=null===wx||void 0===wx?void 0:wx.cloud)||void 0===e?void 0:e.obs)?[2,{errMsg:"function setup is not supported in this version"}]:(o=!0,void 0!==(null==t?void 0:t.isWhitelistMaskMode)?o=t.isWhitelistMaskMode:(null==t?void 0:t.maskMode)&&(o="all-mask"===t.maskMode),T(),wx.cloud.obs.asyncSetup?[2,wx.cloud.obs.asyncSetup(Object.assign(t||{},{projectId:null===__wxConfig||void 0===__wxConfig?void 0:__wxConfig.accountInfo.appId,isWhitelistMaskMode:o,newSessionCallback:function(e){var o,n;s=null!==(o=e.sessionId)&&void 0!==o?o:"",null===(n=null==t?void 0:t.newSessionCallback)||void 0===n||n.call(t,e),T()}})).then((function(t){var e;return s=null!==(e=t.sessionId)&&void 0!==e?e:"",t}))]:[3,1]);case 1:return n=wx.cloud.obs.setup(Object.assign(t||{},{projectId:null===__wxConfig||void 0===__wxConfig?void 0:__wxConfig.accountInfo.appId,isWhitelistMaskMode:o})),s=null!=n?n:"",[4,new Promise((function(t){return setTimeout(t,1e3)}))];case 2:return r.sent(),[2,n?{sessionId:n}:{errMsg:"setup failed"}]}}))}))}function k(){var e,o;return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:if(void 0===(null===(o=null===(e=null===wx||void 0===wx?void 0:wx.cloud)||void 0===e?void 0:e.obs)||void 0===o?void 0:o.teardown))throw new Error("[wxobs]function teardown is not supported in this version");return[4,wx.cloud.obs.teardown()];case 1:return n.sent(),C=new Promise((function(e){var o=setInterval((function(){var n,r;if(void 0===(null===(r=null===(n=wx.cloud)||void 0===n?void 0:n.obs)||void 0===r?void 0:r.getStatus))return e(!0),void clearInterval(o);R()===t.Collecting&&(clearInterval(o),e(!0))}),100)})),[2]}}))}))}function M(t){var e,o;return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,C];case 1:return n.sent(),void 0===(null===(o=null===(e=null===wx||void 0===wx?void 0:wx.cloud)||void 0===e?void 0:e.obs)||void 0===o?void 0:o.setAttrs)?(console.error("[wxobs]function setAttrs is not supported in this version"),[2]):(wx.cloud.obs.setAttrs(t),[2])}}))}))}function j(t){var e,o;return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,C];case 1:return n.sent(),void 0===(null===(o=null===(e=null===wx||void 0===wx?void 0:wx.cloud)||void 0===e?void 0:e.obs)||void 0===o?void 0:o.emitEvent)?(console.error("[wxobs]function emitEvent is not supported in this version"),[2]):(wx.cloud.obs.emitEvent(t),[2])}}))}))}function E(t,e,o){var n="[wxobs] ".concat(t," 调用错误,");try{if("object"==typeof e&&null!==e){var r=Boolean(e.__cos_only__),i=Object.keys(e);if(r||i.length<=10){for(var s=0;s<i.length;s++){if(i[s].length>50&&!i[s].includes(","))return console.error("".concat(n).concat(i[s]," 属性key过长,需<=50,且不包含','")),!1;var l=e[i[s]];if("string"==typeof l){if(!r&&(l.length>255||l.includes(",")))return console.error("".concat(n).concat(i[s]," 属性 value 不符合规则,长度不能超过 255 且不能包含英文逗号(,),如需包含请先转义")),!1;o["wxobs_props_".concat(i[s],"_string")]=l}else{if(!Number.isSafeInteger(l))return console.error("".concat(n).concat(i[s],"属性value不符合规则")),!1;o["wxobs_props_".concat(i[s],"_int")]="".concat(l)}}return r&&(o.__cos_only__="1"),!0}console.error("".concat(n," 需要少于 10 个属性"))}else console.error("".concat(n," 需要为 Object"))}catch(t){console.error(n,t)}return!1}function P(t,e){void 0===e&&(e={});var n={};if(E("event",e,n)){if("string"==typeof t&&t.length<=50&&!t.includes(","))return j(o({wxobs_type:"__userob_default_custom_event_emit__",wxobs_primary_event_name:t},n)),!0;console.error("体验分析helper.event调用错误,eventName需要少于50个字符")}return!1}function A(t){return"string"==typeof t&&t.length<=80&&!t.includes(",")?(j({wxobs_type:"__userob_default_custom_id_set__",wxobs_primary_uid:t}),i=t,wx.setStorage({key:"wxobs_cache_uid",data:t}),!0):(console.error("setCustomId调用错误,自定义id必须为字符串且少于80个字符, 当前输入为'".concat(t,"'")),!1)}function T(){try{var t=wx.getStorageSync("wxobs_cache_uid");t&&A(t)}catch(t){}}function R(){var e,o,n,r,i;return void 0===(null===(o=null===(e=null===wx||void 0===wx?void 0:wx.cloud)||void 0===e?void 0:e.obs)||void 0===o?void 0:o.getStatus)?t.NotSetup:null===(i=null===(r=null===(n=null===wx||void 0===wx?void 0:wx.cloud)||void 0===n?void 0:n.obs)||void 0===r?void 0:r.getStatus)||void 0===i?void 0:i.call(r)}function B(t){return n(this,void 0,void 0,(function(){var n;return r(this,(function(r){switch(r.label){case 0:return wx.obs||console.error("[wxobs] getFeatureFlags is not supported in this version"),[4,wx.obs.getFeatureFlags(t)];case 1:return n=r.sent(),function(t,e){if("string"!=typeof t||"string"!=typeof e)return 0;var o=t.split("."),n=e.split("."),r=Math.max(o.length,n.length);for(;o.length<r;)o.push("0");for(;n.length<r;)n.push("0");for(var i=0;i<r;i++){var s=parseInt(o[i],10),l=parseInt(n[i],10);if(s>l)return 1;if(s<l)return-1}return 0}(wx.version.version,"3.4.7")<0&&setTimeout((function(){!function(t,n){var r,i,s={};try{for(var l=function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),u=l.next();!u.done;u=l.next()){var a=u.value;if(n[a]){var c="flag_value_".concat(a);n[a].type===e.JSON?s[c]=U(JSON.stringify(n[a].value)):n[a].type===e.STRING?s[c]=U(n[a].value+""):n[a].type===e.NUMBER||n[a].type===e.BOOLEAN?s[c]="".concat(n[a].value):(console.warn("体验分析helper: 收到未知类型的 flag(key ".concat(a,",类型 ").concat(n[a].type,"),将当做 string 处理,请检查是否需要更新 SDK 版本,或反馈官方支持")),s[c]=U(n[a].value+""))}else s["flag_empty_".concat(a)]="1"}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}j(o({wxobs_type:"feature_flags_received"},s))}(t.flags,n)}),0),[2,n]}}))}))}function W(){return wx.obs||console.error("[wxobs] getFeatureFlagsSync is not supported in this version"),wx.obs.getFeatureFlagsSync()}function U(t){for(var e=t.length,o=5381,n=0;n<e;++n)o=(o<<5)+o+t.charCodeAt(n);return String(o)}wx.obs||Object.assign(wx,{obs:{}}),Object.assign(wx.obs,{setup:null!==(u=null===(l=wx.obs)||void 0===l?void 0:l.setup)&&void 0!==u?u:N,event:null!==(c=null===(a=wx.obs)||void 0===a?void 0:a.event)&&void 0!==c?c:P,setCustomId:null!==(v=null===(d=wx.obs)||void 0===d?void 0:d.setCustomId)&&void 0!==v?v:A,setCustomProperties:null!==(p=null===(f=wx.obs)||void 0===f?void 0:f.setCustomProperties)&&void 0!==p?p:A,teardown:null!==(b=null===(w=wx.obs)||void 0===w?void 0:w.teardown)&&void 0!==b?b:k,setAttrs:null!==(g=null===(x=wx.obs)||void 0===x?void 0:x.setAttrs)&&void 0!==g?g:M,getStatus:null!==(h=null===(_=wx.obs)||void 0===_?void 0:_.getStatus)&&void 0!==h?h:R,getSessionId:null!==(S=null===(y=wx.obs)||void 0===y?void 0:y.getSessionId)&&void 0!==S?S:function(){return s},getFeatureFlags:null!==(I=null===(m=wx.obs)||void 0===m?void 0:m.getFeatureFlags)&&void 0!==I?I:B,getFeatureFlagsSync:null!==(O=null===(F=wx.obs)||void 0===F?void 0:F.getFeatureFlagsSync)&&void 0!==O?O:W}),exports.event=P,exports.getFeatureFlags=B,exports.getFeatureFlagsSync=W,exports.getStatus=R,exports.setAttrs=M,exports.setCustomId=A,exports.setCustomProperties=function(t){if(!i)return console.error("未setId。无法setProperties"),!1;var e={};return!!E("setCustomProperties",t,e)&&(j(o({wxobs_type:"__userob_default_custom_props_set__",wxobs_primary_uid:i},e)),!0)},exports.setup=N,exports.teardown=k;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e,o=function(){return o=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};function n(t,e,o,n){return new(o||(o=Promise))((function(r,i){function s(t){try{u(n.next(t))}catch(t){i(t)}}function l(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(s,l)}u((n=n.apply(t,e||[])).next())}))}function r(t,e){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=l(0),s.throw=l(1),s.return=l(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function l(l){return function(u){return function(l){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&l[0]?n.return:l[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,l[1])).done)return r;switch(n=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(6===l[0]&&i.label<r[1]){i.label=r[1],r=l;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(l);break}r[2]&&i.ops.pop(),i.trys.pop();continue}l=e.call(t,i)}catch(t){l=[6,t],n=0}finally{o=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,u])}}}"function"==typeof SuppressedError&&SuppressedError,function(t){t.NotSetup="NotSetup",t.SettingUp="SettingUp",t.WaitingForFirstReport="WaitingForFirstReport",t.Collecting="Collecting",t.TearingDown="TearingDown"}(t||(t={})),function(t){t[t.BOOLEAN=1]="BOOLEAN",t[t.STRING=2]="STRING",t[t.NUMBER=3]="NUMBER",t[t.JSON=4]="JSON"}(e||(e={}));var i,s,l,u,a,c,d,v,f,p,w,b,x,g,_,h,y,S,m,I,F=new Promise((function(e){var o=setInterval((function(){var n,r;if(void 0===(null===(r=null===(n=wx.cloud)||void 0===n?void 0:n.obs)||void 0===r?void 0:r.getStatus))return e(!0),void clearInterval(o);A()===t.Collecting&&(clearInterval(o),e(!0))}),100)}));function O(t){var e;return n(this,void 0,void 0,(function(){var o,n;return r(this,(function(r){switch(r.label){case 0:return void 0===(null===(e=null===wx||void 0===wx?void 0:wx.cloud)||void 0===e?void 0:e.obs)?[2,{errMsg:"function setup is not supported in this version"}]:(o=!0,void 0!==(null==t?void 0:t.isWhitelistMaskMode)?o=t.isWhitelistMaskMode:(null==t?void 0:t.maskMode)&&(o="all-mask"===t.maskMode),P(),wx.cloud.obs.asyncSetup?[2,wx.cloud.obs.asyncSetup(Object.assign(t||{},{projectId:null===__wxConfig||void 0===__wxConfig?void 0:__wxConfig.accountInfo.appId,isWhitelistMaskMode:o,newSessionCallback:function(e){var o,n;s=null!==(o=e.sessionId)&&void 0!==o?o:"",null===(n=null==t?void 0:t.newSessionCallback)||void 0===n||n.call(t,e),P()}})).then((function(t){var e;return s=null!==(e=t.sessionId)&&void 0!==e?e:"",t}))]:[3,1]);case 1:return n=wx.cloud.obs.setup(Object.assign(t||{},{projectId:null===__wxConfig||void 0===__wxConfig?void 0:__wxConfig.accountInfo.appId,isWhitelistMaskMode:o})),s=null!=n?n:"",[4,new Promise((function(t){return setTimeout(t,1e3)}))];case 2:return r.sent(),[2,n?{sessionId:n}:{errMsg:"setup failed"}]}}))}))}function C(){var e,o;return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:if(void 0===(null===(o=null===(e=null===wx||void 0===wx?void 0:wx.cloud)||void 0===e?void 0:e.obs)||void 0===o?void 0:o.teardown))throw new Error("[wxobs]function teardown is not supported in this version");return[4,wx.cloud.obs.teardown()];case 1:return n.sent(),F=new Promise((function(e){var o=setInterval((function(){var n,r;if(void 0===(null===(r=null===(n=wx.cloud)||void 0===n?void 0:n.obs)||void 0===r?void 0:r.getStatus))return e(!0),void clearInterval(o);A()===t.Collecting&&(clearInterval(o),e(!0))}),100)})),[2]}}))}))}function N(t){var e,o;return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,F];case 1:return n.sent(),void 0===(null===(o=null===(e=null===wx||void 0===wx?void 0:wx.cloud)||void 0===e?void 0:e.obs)||void 0===o?void 0:o.setAttrs)?(console.error("[wxobs]function setAttrs is not supported in this version"),[2]):(wx.cloud.obs.setAttrs(t),[2])}}))}))}function k(t){var e,o;return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,F];case 1:return n.sent(),void 0===(null===(o=null===(e=null===wx||void 0===wx?void 0:wx.cloud)||void 0===e?void 0:e.obs)||void 0===o?void 0:o.emitEvent)?(console.error("[wxobs]function emitEvent is not supported in this version"),[2]):(wx.cloud.obs.emitEvent(t),[2])}}))}))}function M(t,e,o){var n="[wxobs] ".concat(t," 调用错误,");try{if("object"==typeof e&&null!==e){var r=Boolean(e.__cos_only__),i=Object.keys(e);if(r||i.length<=10){for(var s=0;s<i.length;s++){if(i[s].length>50&&!i[s].includes(","))return console.error("".concat(n).concat(i[s]," 属性key过长,需<=50,且不包含','")),!1;var l=e[i[s]];if("string"==typeof l){if(!r&&(l.length>255||l.includes(",")))return console.error("".concat(n).concat(i[s]," 属性 value 不符合规则,长度不能超过 255 且不能包含英文逗号(,),如需包含请先转义")),!1;o["wxobs_props_".concat(i[s],"_string")]=l}else{if(!Number.isSafeInteger(l))return console.error("".concat(n).concat(i[s],"属性value不符合规则")),!1;o["wxobs_props_".concat(i[s],"_int")]="".concat(l)}}return r&&(o.__cos_only__="1"),!0}console.error("".concat(n," 需要少于 10 个属性"))}else console.error("".concat(n," 需要为 Object"))}catch(t){console.error(n,t)}return!1}function j(t,e){void 0===e&&(e={});var n={};if(M("event",e,n)){if("string"==typeof t&&t.length<=50&&!t.includes(","))return k(o({wxobs_type:"__userob_default_custom_event_emit__",wxobs_primary_event_name:t},n)),!0;console.error("体验分析helper.event调用错误,eventName需要少于50个字符")}return!1}function E(t){return"string"==typeof t&&t.length<=80&&!t.includes(",")?(k({wxobs_type:"__userob_default_custom_id_set__",wxobs_primary_uid:t}),i=t,wx.setStorage({key:"wxobs_cache_uid",data:t}),!0):(console.error("setCustomId调用错误,自定义id必须为字符串且少于80个字符, 当前输入为'".concat(t,"'")),!1)}function P(){try{var t=wx.getStorageSync("wxobs_cache_uid");t&&E(t)}catch(t){}}function A(){var e,o,n,r,i;return void 0===(null===(o=null===(e=null===wx||void 0===wx?void 0:wx.cloud)||void 0===e?void 0:e.obs)||void 0===o?void 0:o.getStatus)?t.NotSetup:null===(i=null===(r=null===(n=null===wx||void 0===wx?void 0:wx.cloud)||void 0===n?void 0:n.obs)||void 0===r?void 0:r.getStatus)||void 0===i?void 0:i.call(r)}function T(t){return n(this,void 0,void 0,(function(){var n;return r(this,(function(r){switch(r.label){case 0:return wx.obs||console.error("[wxobs] getFeatureFlags is not supported in this version"),[4,wx.obs.getFeatureFlags(t)];case 1:return n=r.sent(),function(t,e){if("string"!=typeof t||"string"!=typeof e)return 0;var o=t.split("."),n=e.split("."),r=Math.max(o.length,n.length);for(;o.length<r;)o.push("0");for(;n.length<r;)n.push("0");for(var i=0;i<r;i++){var s=parseInt(o[i],10),l=parseInt(n[i],10);if(s>l)return 1;if(s<l)return-1}return 0}(wx.version.version,"3.4.7")<0&&setTimeout((function(){!function(t,n){var r,i,s={};try{for(var l=function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),u=l.next();!u.done;u=l.next()){var a=u.value;if(n[a]){var c="flag_value_".concat(a);n[a].type===e.JSON?s[c]=B(JSON.stringify(n[a].value)):n[a].type===e.STRING?s[c]=B(n[a].value+""):n[a].type===e.NUMBER||n[a].type===e.BOOLEAN?s[c]="".concat(n[a].value):(console.warn("体验分析helper: 收到未知类型的 flag(key ".concat(a,",类型 ").concat(n[a].type,"),将当做 string 处理,请检查是否需要更新 SDK 版本,或反馈官方支持")),s[c]=B(n[a].value+""))}else s["flag_empty_".concat(a)]="1"}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}k(o({wxobs_type:"feature_flags_received"},s))}(t.flags,n)}),0),[2,n]}}))}))}function R(){return wx.obs||console.error("[wxobs] getFeatureFlagsSync is not supported in this version"),wx.obs.getFeatureFlagsSync()}function B(t){for(var e=t.length,o=5381,n=0;n<e;++n)o=(o<<5)+o+t.charCodeAt(n);return String(o)}wx.obs||Object.assign(wx,{obs:{}}),Object.assign(wx.obs,{setup:null!==(u=null===(l=wx.obs)||void 0===l?void 0:l.setup)&&void 0!==u?u:O,event:null!==(c=null===(a=wx.obs)||void 0===a?void 0:a.event)&&void 0!==c?c:j,setCustomId:null!==(v=null===(d=wx.obs)||void 0===d?void 0:d.setCustomId)&&void 0!==v?v:E,setCustomProperties:null!==(p=null===(f=wx.obs)||void 0===f?void 0:f.setCustomProperties)&&void 0!==p?p:E,teardown:null!==(b=null===(w=wx.obs)||void 0===w?void 0:w.teardown)&&void 0!==b?b:C,setAttrs:null!==(g=null===(x=wx.obs)||void 0===x?void 0:x.setAttrs)&&void 0!==g?g:N,getStatus:null!==(h=null===(_=wx.obs)||void 0===_?void 0:_.getStatus)&&void 0!==h?h:A,getSessionId:function(){var t,e,o;return(null===(t=wx.obs)||void 0===t?void 0:t.getSessionId)?null===(o=null===(e=wx.obs)||void 0===e?void 0:e.getSessionId)||void 0===o?void 0:o.call(e):s},getFeatureFlags:null!==(S=null===(y=wx.obs)||void 0===y?void 0:y.getFeatureFlags)&&void 0!==S?S:T,getFeatureFlagsSync:null!==(I=null===(m=wx.obs)||void 0===m?void 0:m.getFeatureFlagsSync)&&void 0!==I?I:R}),exports.event=j,exports.getFeatureFlags=T,exports.getFeatureFlagsSync=R,exports.getStatus=A,exports.setAttrs=N,exports.setCustomId=E,exports.setCustomProperties=function(t){if(!i)return console.error("未setId。无法setProperties"),!1;var e={};return!!M("setCustomProperties",t,e)&&(k(o({wxobs_type:"__userob_default_custom_props_set__",wxobs_primary_uid:i},e)),!0)},exports.setup=O,exports.teardown=C;
{
"name": "@wxobs/miniprogram-helper",
"version": "0.6.5",
"version": "0.6.6",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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