@instantdomain/bandit
Advanced tools
Comparing version 1.0.10 to 1.0.11
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.flushPromises=exports.useIsomorphicLayoutEffect=exports.isBrowserEnvironment=exports.getBaseUrl=exports.getCookie=exports.env=exports.exists=exports.deepFreeze=exports.markVariantInSession=exports.makeNewSession=exports.encodeMetricsBatch=void 0;var b=require("tslib"),a=require("react"),f=b.__importStar(require("./constants"));function c(a,b){return(void 0===b&&(b=new WeakMap),function(a){return null!=a}(a))?(b.set(a,!0),Object.getOwnPropertyNames(a).filter(function(c){return!b.has(a[c])}).filter(function(b){return a[b]&&"object"==typeof a[b]}).forEach(function(d){return c(a[d],b)}),Object.freeze(a)):a}function d(a){return null!=a}function e(a){return"undefined"==typeof process?void 0:exports.isBrowserEnvironment?process.env[f.NEXTJS_PUBLIC_PREFIX+a]:process.env[a]}exports.encodeMetricsBatch=function(a){var c=a.site,d=a.experiment,e=a.variant,f=a.entries,g=JSON.stringify({site:c,experiment:d,variant:e}),h=f.map(function(a){var f=a.name,g=a.ts,b=a.payload,c=function(a){return null!=a}(b),d={ts:g,name:f,payload:void 0};c&&(d.payload=1);var e=JSON.stringify(d);return c?e+"\n"+JSON.stringify(b):e});return b.__spreadArray([g],h,!0).join("\n")},exports.makeNewSession=function(a){return void 0===a&&(a=""),{sid:a,selections:{}}},exports.markVariantInSession=function(e,f,d,g){var h,b=e.selections;b||(b=e.selections={});var c=b[f];c||(c=b[f]=((h={})[d]=[],h));var i,a=c[d];i=a,null!=i||(a=c[d]=[]);var j=a.indexOf(g);j> -1&&a.splice(j,1),a.push(g)},exports.deepFreeze=c,exports.exists=d,exports.env=e,exports.getCookie=function(d,a){void 0===a&&(a="");var c="";if("undefined"==typeof document&&""===a)return null;var b=(c=""!==a?a:document.cookie).split(";").map(function(a){return a.trim()}).filter(function(a){return 0===a.indexOf(d)}).map(function(a){return a.substring(d.length+1,a.length)}).pop();return null!=b?b:null},exports.getBaseUrl=function(){var a;return null!==(a=e(f.VARNAME_BASE_URL))&& void 0!==a?a:f.DEFAULT_BASE_URL},exports.isBrowserEnvironment="undefined"!=typeof window,exports.useIsomorphicLayoutEffect=exports.isBrowserEnvironment?a.useLayoutEffect:a.useEffect,exports.flushPromises=function(){return b.__awaiter(void 0,void 0,void 0,function(){return b.__generator(this,function(a){return[2,new Promise(function(a){g(a)})]})})};var g="function"==typeof setImmediate?setImmediate:setTimeout | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.flushPromises=exports.useIsomorphicLayoutEffect=exports.isBrowserEnvironment=exports.getBaseUrl=exports.getCookie=exports.env=exports.exists=exports.deepFreeze=exports.markVariantInSession=exports.makeNewSession=exports.encodeMetricsBatch=void 0;var b=require("tslib"),a=require("react"),f=b.__importStar(require("./constants"));function c(a,b){return(void 0===b&&(b=new WeakMap),function(a){return null!=a}(a))?(b.set(a,!0),Object.getOwnPropertyNames(a).filter(function(c){return!b.has(a[c])}).filter(function(b){return a[b]&&"object"==typeof a[b]}).forEach(function(d){return c(a[d],b)}),Object.freeze(a)):a}function d(a){return null!=a}function e(a){return"undefined"==typeof process?void 0:exports.isBrowserEnvironment?process.env[f.NEXTJS_PUBLIC_PREFIX+a]:process.env[a]}exports.encodeMetricsBatch=function(a){var c=a.site,d=a.experiment,e=a.variant,f=a.entries,g=JSON.stringify({site:c,experiment:d,variant:e}),h=f.map(function(a){var f=a.name,g=a.ts,b=a.payload,c=function(a){return null!=a}(b),d={ts:g,name:f,payload:void 0};c&&(d.payload=1);var e=JSON.stringify(d);return c?e+"\n"+JSON.stringify(b):e});return b.__spreadArray([g],h,!0).join("\n")},exports.makeNewSession=function(a){return void 0===a&&(a=""),{sid:a,selections:{}}},exports.markVariantInSession=function(e,f,d,g){var h,b=e.selections;b||(b=e.selections={});var c=b[f];c||(c=b[f]=((h={})[d]=[],h));var i,a=c[d];i=a,null!=i||(a=c[d]=[]);var j=a.indexOf(g);j> -1&&a.splice(j,1),a.push(g)},exports.deepFreeze=c,exports.exists=d,exports.env=e,exports.getCookie=function(d,a){void 0===a&&(a="");var c="";if("undefined"==typeof document&&""===a)return null;var b=(c=""!==a?a:document.cookie).split(";").map(function(a){return a.trim()}).filter(function(a){return 0===a.indexOf(d)}).map(function(a){return a.substring(d.length+1,a.length)}).pop();return null!=b?b:null},exports.getBaseUrl=function(){return e(f.VARNAME_BASE_URL)||f.DEFAULT_BASE_URL},exports.isBrowserEnvironment="undefined"!=typeof window,exports.useIsomorphicLayoutEffect=exports.isBrowserEnvironment?a.useLayoutEffect:a.useEffect,exports.flushPromises=function(){return b.__awaiter(void 0,void 0,void 0,function(){return b.__generator(this,function(a){return[2,new Promise(function(a){g(a)})]})})};var g="function"==typeof setImmediate?setImmediate:setTimeout |
{ | ||
"name": "@instantdomain/bandit", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2
89681