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

analytics-utils

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analytics-utils - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.2.2](https://github.com/DavidWells/analytics/compare/analytics-utils@0.2.1...analytics-utils@0.2.2) (2020-07-14)
**Note:** Version bump only for package analytics-utils
## [0.2.1](https://github.com/DavidWells/analytics/compare/analytics-utils@0.2.0...analytics-utils@0.2.1) (2020-04-21)

@@ -8,0 +16,0 @@

63

dist/analytics-utils.js
var analyticsUtils = (function (exports) {
'use strict';
function dlv_es(t,e,l,n,r){for(e=e.split?e.split("."):e,n=0;n<e.length;n++)t=t?t[e[n]]:r;return t===r?l:t}
function cookie(name, value, ttl, path, domain, secure) {

@@ -118,23 +120,4 @@ if (typeof window === 'undefined') return;

}
/* global self globalThis */
function getGlobalThis() {
if (typeof globalThis !== 'undefined') return globalThis;
if (typeof global !== 'undefined') return global;
if (typeof self !== 'undefined') return self;
/* eslint-disable-line no-restricted-globals */
if (typeof window !== 'undefined') return window;
if (typeof this !== 'undefined') return this;
return {}; // should never happen
}
/* tinier from https://github.com/purposeindustries/window-or-global/blob/master/lib/index.js
const context = (typeof self === 'object' && self.self === self && self) || // eslint-disable-line
(typeof global === 'object' && global.global === global && global) ||
this
export default context
*/
var globalContext = (typeof self === "undefined" ? "undefined" : _typeof(self)) === 'object' && self.self === self && self || (typeof global === "undefined" ? "undefined" : _typeof(global)) === 'object' && global.global === global && global || undefined;
var LOCAL_STORAGE = 'localStorage';

@@ -177,3 +160,3 @@ var COOKIE = 'cookie';

return getGlobalThis[key] || null;
return globalContext[key] || null;
}

@@ -185,3 +168,3 @@

localStorage: parse(localStorage.getItem(key)),
global: getGlobalThis[key] || null
global: globalContext[key] || null
};

@@ -234,4 +217,4 @@ }

var oldValue = getGlobalThis[key];
getGlobalThis[key] = value;
var oldValue = globalContext[key];
globalContext[key] = value;
return {

@@ -268,3 +251,3 @@ value: value,

getGlobalThis[key] = null;
globalContext[key] = undefined;
return GLOBAL;

@@ -291,4 +274,2 @@ }

function dlv_es(t,e,l,n,r){for(e=e.split?e.split("."):e,n=0;n<e.length;n++)t=t?t[e[n]]:r;return t===r?l:t}
function _typeof$1(obj) {

@@ -760,31 +741,6 @@ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {

// const context = (typeof self === 'object' && self.self === self && self) || // eslint-disable-line
/* global self globalThis */
var getGlobal = function getGlobal() {
/* eslint-disable */
if (typeof self !== 'undefined' && self) {
return self;
}
/* eslint-enable */
if (inBrowser && window) {
return window;
}
if (inBrowser && global) {
return global;
}
if (typeof globalThis !== 'undefined' && globalThis) {
return globalThis;
}
};
var globalContext = getGlobal();
exports.storage = index;
exports.getCookie = getCookie;
exports.setCookie = setCookie;
exports.globalContext = globalContext;
exports.removeCookie = removeCookie;

@@ -811,3 +767,2 @@ exports.isFunction = isFunction;

exports.uuid = uuid;
exports.globalContext = globalContext;

@@ -814,0 +769,0 @@ return exports;

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

var analyticsUtils=function(e){"use strict";function t(e,t,n,r,o,i){if("undefined"!=typeof window)return 1<arguments.length?document.cookie=e+"="+encodeURIComponent(t)+(n?"; expires="+new Date(+new Date+1e3*n).toUTCString()+(r?"; path="+r:"")+(o?"; domain="+o:"")+(i?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}var u=t,l=t;function r(e){return t(e,"",-1)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(t){var n;try{void 0===(n=JSON.parse(t))&&(n=t),"true"===n&&(n=!0),"false"===n&&(n=!1),parseFloat(n)===n&&"object"!==o(n)&&(n=parseFloat(n))}catch(e){n=t}return n}function s(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==this?this:{}}var m="localStorage",d="cookie",g="global",n=!1,i=function(){try{t("_c_","1");var e=-1!==document.cookie.indexOf("_c_");return t("_c_","",-1),e}catch(e){return!1}}();function p(e){return"string"==typeof e?e:e.storage}function v(e){return n&&(!e||e===m)}function y(e){return i&&(!e||e===d)}var c={getItem:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!e)return null;var n,r=p(t);if("all"===r)return{cookie:f(u(n=e)),localStorage:f(localStorage.getItem(n)),global:s[n]||null};if(v(r)){var o=localStorage.getItem(e);if(o||r===m)return f(o)}if(y(r)){var i=u(e);if(i||r===d)return f(i)}return s[e]||null},setItem:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(!e||!t)return!1;var r=p(n),o=JSON.stringify(t);if(v(r)){var i=f(localStorage.getItem(e));return localStorage.setItem(e,o),{value:t,oldValue:i,location:m}}if(y(r)){var c=f(u(e));return l(e,o),{value:t,oldValue:c,location:d}}var a=s[e];return{value:s[e]=t,oldValue:a,location:g}},removeItem:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!e)return!1;var n=p(t);return v(n)?(localStorage.removeItem(e),m):y(n)?(r(e),d):(s[e]=null,g)}};function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}var b="undefined"!=typeof document;function w(e){if(!b)return!1;var t=e||document.referrer;if(t){var n=window.document.location.port,r=t.split("/")[2];return n&&(r=r.replace(":".concat(n),"")),r!==window.location.hostname}return!1}function S(e,t){var n=(e.split("?")||[,])[1];if(!n||-1===n.indexOf(t))return e;var r=new RegExp("(\\&|\\?)".concat(t,'([_A-Za-z0-9"+=.\\/\\-@%]+)'),"g"),o="?".concat(n).replace(r,"").replace(/^&/,"?");return e.replace("?".concat(n),o)}function O(e){var t=function(e){if(e){var t=e.match(/\?(.*)/);return t&&t[1]?t[1].split("#")[0]:""}return b&&window.location.search.substring(1)}(e);return t?function(e){var t,n=/([^&=]+)=?([^&]*)/g,r={};for(;t=n.exec(e);){var o=h(t[1]),i=h(t[2]);if("[]"===o.substring(o.length-2))o=o.substring(0,o.length-2),(r[o]||(r[o]=[])).push(i);else{var c=""===i||i;r[o]=c}}for(var a in r){var u=a.split("[");if(1<u.length){var l=[];u.forEach(function(e,t){var n=e.replace(/[?[\]\\ ]/g,"");l.push(n)}),x(r,l,r[a]),delete r[a]}}return r}(t):{}}function x(e,t,n){for(var r=t.length-1,o=0;o<r;++o){var i=t[o];i in e||(e[i]={}),e=e[i]}e[t[r]]=n}function I(e){if(!b)return null;var t=document.createElement("a");return t.setAttribute("href",e),t.hostname}function k(e){return(I(e)||"").split(".").slice(-2).join(".")}function j(e){var t=e.split(".");return 1<t.length?t.slice(0,-1).join("."):e}var T={trimTld:j,getDomainBase:k,getDomainHost:I},R="google";var _="q",C="query",E={"daum.net":_,"eniro.se":"search_word","naver.com":C,"yahoo.com":"p","msn.com":_,"aol.com":_,"lycos.com":_,"ask.com":_,"cnn.com":C,"about.com":"terms","baidu.com":"wd","yandex.com":"text","seznam.cz":_,"search.com":_,"yam.com":"k","kvasir.no":_,"terra.com":C,"mynet.com":_,"rambler.ru":"words",google:_,"bing.com":{p:_,n:"live"}};function D(){return 4294967295*Math.random()|0}var P="undefined"!=typeof self&&self?self:b&&window?window:b&&global?global:"undefined"!=typeof globalThis&&globalThis?globalThis:void 0;return e.storage=c,e.getCookie=u,e.setCookie=l,e.removeCookie=r,e.isFunction=function(e){return"function"==typeof e},e.isString=function(e){return"string"==typeof e},e.isObject=function(e){if("object"!==a(e)||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},e.isUndefined=function(e){return void 0===e},e.isBoolean=function(e){return"boolean"==typeof e},e.dotProp=function(e,t,n,r,o){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:o;return e===o?n:e},e.decodeUri=h,e.getBrowserLocale=function(){if(!b)return null;var e=navigator,t=e.language,n=e.languages,r=e.userLanguage;return n&&n.length?n[0]:r||t},e.getTimeZone=function(){return"undefined"==typeof Intl||"function"!=typeof Intl.DateTimeFormat||"function"!=typeof Intl.DateTimeFormat().resolvedOptions?null:Intl.DateTimeFormat().resolvedOptions().timeZone},e.inBrowser=b,e.isExternalReferrer=w,e.isScriptLoaded=function(n){if(!b)return!0;var r=document.getElementsByTagName("script");return!!Object.keys(r).filter(function(e){var t=r[e].src;return"string"==typeof n?-1!==t.indexOf(n):n instanceof RegExp&&t.match(n)}).length},e.noOp=function(){},e.paramsClean=S,e.paramsGet=function(e,t){return h((RegExp("".concat(e,"=(.+?)(&|$)")).exec(t)||[,""])[1])},e.paramsParse=O,e.paramsRemove=function(o,i){return b?new Promise(function(e,t){if(window.history&&window.history.replaceState){var n=window.location.href,r=S(n,o);n!==r&&history.replaceState({},"",r)}return i&&i(),e()}):Promise.resolve()},e.parseReferrer=function(e,t){if(!b)return!1;var n={source:"(direct)",medium:"(none)",campaign:"(not set)"};e&&w(e)&&(n.referrer=e);var r=function(e){if(!e||!b)return!1;var t=k(e),n=document.createElement("a");if(n.href=e,-1<n.hostname.indexOf(R)&&(t=R),E[t]){var r=E[t],o="string"==typeof r?r:r.p,i=new RegExp(o+"=.*?([^&#]*|$)","gi"),c=n.search.match(i);return{source:r.n||j(t),medium:"organic",term:(c?c[0].split("=")[1]:"")||"(not provided)"}}var a=w(e)?"referral":"internal";return{source:n.hostname,medium:a}}(e);r&&Object.keys(r).length&&(n=Object.assign({},n,r));var o=O(t),i=Object.keys(o);if(i.length){var c=i.reduce(function(e,t){return t.match(/^utm_/)&&(e["".concat(t.replace(/^utm_/,""))]=o[t]),t.match(/^(d|g)clid/)&&(e.source=R,e.medium=o.gclid?"cpc":"cpm",e[t]=o[t]),e},{});n=Object.assign({},n,c),(o.dclid||o.gclid)&&(n.source=R,n.medium=o.gclid?"cpc":"cpm")}return n},e.url=T,e.uuid=function(){for(var e,t,n,r,o=[],i=0;i<256;i++)o[i]=(i<16?"0":"")+i.toString(16);return e=D(),t=D(),n=D(),r=D(),"".concat(o[255&e]+o[e>>8&255]+o[e>>16&255]+o[e>>24&255],"-").concat(o[255&t]).concat(o[t>>8&255],"-").concat(o[t>>16&15|64]).concat(o[t>>24&255],"-").concat(o[63&n|128]).concat(o[n>>8&255],"-").concat(o[n>>16&255]).concat(o[n>>24&255]).concat(o[255&r]).concat(o[r>>8&255]).concat(o[r>>16&255]).concat(o[r>>24&255])},e.globalContext=P,e}({});
var analyticsUtils=function(e){"use strict";function t(e,t,n,r,o,c){if("undefined"!=typeof window)return 1<arguments.length?document.cookie=e+"="+encodeURIComponent(t)+(n?"; expires="+new Date(+new Date+1e3*n).toUTCString()+(r?"; path="+r:"")+(o?"; domain="+o:"")+(c?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}var u=t,l=t;function r(e){return t(e,"",-1)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(t){var n;try{void 0===(n=JSON.parse(t))&&(n=t),"true"===n&&(n=!0),"false"===n&&(n=!1),parseFloat(n)===n&&"object"!==o(n)&&(n=parseFloat(n))}catch(e){n=t}return n}var s="object"===("undefined"==typeof self?"undefined":o(self))&&self.self===self&&self||"object"===("undefined"==typeof global?"undefined":o(global))&&global.global===global&&global||void 0,m="localStorage",g="cookie",d="global",n=!1,c=function(){try{t("_c_","1");var e=-1!==document.cookie.indexOf("_c_");return t("_c_","",-1),e}catch(e){return!1}}();function p(e){return"string"==typeof e?e:e.storage}function v(e){return n&&(!e||e===m)}function y(e){return c&&(!e||e===g)}var a={getItem:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!e)return null;var n,r=p(t);if("all"===r)return{cookie:f(u(n=e)),localStorage:f(localStorage.getItem(n)),global:s[n]||null};if(v(r)){var o=localStorage.getItem(e);if(o||r===m)return f(o)}if(y(r)){var c=u(e);if(c||r===g)return f(c)}return s[e]||null},setItem:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(!e||!t)return!1;var r=p(n),o=JSON.stringify(t);if(v(r)){var c=f(localStorage.getItem(e));return localStorage.setItem(e,o),{value:t,oldValue:c,location:m}}if(y(r)){var a=f(u(e));return l(e,o),{value:t,oldValue:a,location:g}}var i=s[e];return{value:s[e]=t,oldValue:i,location:d}},removeItem:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!e)return!1;var n=p(t);return v(n)?(localStorage.removeItem(e),m):y(n)?(r(e),g):(s[e]=void 0,d)}};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}var h="undefined"!=typeof document;function S(e){if(!h)return!1;var t=e||document.referrer;if(t){var n=window.document.location.port,r=t.split("/")[2];return n&&(r=r.replace(":".concat(n),"")),r!==window.location.hostname}return!1}function w(e,t){var n=(e.split("?")||[,])[1];if(!n||-1===n.indexOf(t))return e;var r=new RegExp("(\\&|\\?)".concat(t,'([_A-Za-z0-9"+=.\\/\\-@%]+)'),"g"),o="?".concat(n).replace(r,"").replace(/^&/,"?");return e.replace("?".concat(n),o)}function O(e){var t=function(e){if(e){var t=e.match(/\?(.*)/);return t&&t[1]?t[1].split("#")[0]:""}return h&&window.location.search.substring(1)}(e);return t?function(e){var t,n=/([^&=]+)=?([^&]*)/g,r={};for(;t=n.exec(e);){var o=b(t[1]),c=b(t[2]);if("[]"===o.substring(o.length-2))o=o.substring(0,o.length-2),(r[o]||(r[o]=[])).push(c);else{var a=""===c||c;r[o]=a}}for(var i in r){var u=i.split("[");if(1<u.length){var l=[];u.forEach(function(e,t){var n=e.replace(/[?[\]\\ ]/g,"");l.push(n)}),j(r,l,r[i]),delete r[i]}}return r}(t):{}}function j(e,t,n){for(var r=t.length-1,o=0;o<r;++o){var c=t[o];c in e||(e[c]={}),e=e[c]}e[t[r]]=n}function x(e){if(!h)return null;var t=document.createElement("a");return t.setAttribute("href",e),t.hostname}function I(e){return(x(e)||"").split(".").slice(-2).join(".")}function k(e){var t=e.split(".");return 1<t.length?t.slice(0,-1).join("."):e}var R={trimTld:k,getDomainBase:I,getDomainHost:x},_="google";var C="q",E="query",D={"daum.net":C,"eniro.se":"search_word","naver.com":E,"yahoo.com":"p","msn.com":C,"aol.com":C,"lycos.com":C,"ask.com":C,"cnn.com":E,"about.com":"terms","baidu.com":"wd","yandex.com":"text","seznam.cz":C,"search.com":C,"yam.com":"k","kvasir.no":C,"terra.com":E,"mynet.com":C,"rambler.ru":"words",google:C,"bing.com":{p:C,n:"live"}};function P(){return 4294967295*Math.random()|0}return e.storage=a,e.getCookie=u,e.setCookie=l,e.globalContext=s,e.removeCookie=r,e.isFunction=function(e){return"function"==typeof e},e.isString=function(e){return"string"==typeof e},e.isObject=function(e){if("object"!==i(e)||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},e.isUndefined=function(e){return void 0===e},e.isBoolean=function(e){return"boolean"==typeof e},e.dotProp=function(e,t,n,r,o){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:o;return e===o?n:e},e.decodeUri=b,e.getBrowserLocale=function(){if(!h)return null;var e=navigator,t=e.language,n=e.languages,r=e.userLanguage;return n&&n.length?n[0]:r||t},e.getTimeZone=function(){return"undefined"==typeof Intl||"function"!=typeof Intl.DateTimeFormat||"function"!=typeof Intl.DateTimeFormat().resolvedOptions?null:Intl.DateTimeFormat().resolvedOptions().timeZone},e.inBrowser=h,e.isExternalReferrer=S,e.isScriptLoaded=function(n){if(!h)return!0;var r=document.getElementsByTagName("script");return!!Object.keys(r).filter(function(e){var t=r[e].src;return"string"==typeof n?-1!==t.indexOf(n):n instanceof RegExp&&t.match(n)}).length},e.noOp=function(){},e.paramsClean=w,e.paramsGet=function(e,t){return b((RegExp("".concat(e,"=(.+?)(&|$)")).exec(t)||[,""])[1])},e.paramsParse=O,e.paramsRemove=function(o,c){return h?new Promise(function(e,t){if(window.history&&window.history.replaceState){var n=window.location.href,r=w(n,o);n!==r&&history.replaceState({},"",r)}return c&&c(),e()}):Promise.resolve()},e.parseReferrer=function(e,t){if(!h)return!1;var n={source:"(direct)",medium:"(none)",campaign:"(not set)"};e&&S(e)&&(n.referrer=e);var r=function(e){if(!e||!h)return!1;var t=I(e),n=document.createElement("a");if(n.href=e,-1<n.hostname.indexOf(_)&&(t=_),D[t]){var r=D[t],o="string"==typeof r?r:r.p,c=new RegExp(o+"=.*?([^&#]*|$)","gi"),a=n.search.match(c);return{source:r.n||k(t),medium:"organic",term:(a?a[0].split("=")[1]:"")||"(not provided)"}}var i=S(e)?"referral":"internal";return{source:n.hostname,medium:i}}(e);r&&Object.keys(r).length&&(n=Object.assign({},n,r));var o=O(t),c=Object.keys(o);if(c.length){var a=c.reduce(function(e,t){return t.match(/^utm_/)&&(e["".concat(t.replace(/^utm_/,""))]=o[t]),t.match(/^(d|g)clid/)&&(e.source=_,e.medium=o.gclid?"cpc":"cpm",e[t]=o[t]),e},{});n=Object.assign({},n,a),(o.dclid||o.gclid)&&(n.source=_,n.medium=o.gclid?"cpc":"cpm")}return n},e.url=R,e.uuid=function(){for(var e,t,n,r,o=[],c=0;c<256;c++)o[c]=(c<16?"0":"")+c.toString(16);return e=P(),t=P(),n=P(),r=P(),"".concat(o[255&e]+o[e>>8&255]+o[e>>16&255]+o[e>>24&255],"-").concat(o[255&t]).concat(o[t>>8&255],"-").concat(o[t>>16&15|64]).concat(o[t>>24&255],"-").concat(o[63&n|128]).concat(o[n>>8&255],"-").concat(o[n>>16&255]).concat(o[n>>24&255]).concat(o[255&r]).concat(o[r>>8&255]).concat(o[r>>16&255]).concat(o[r>>24&255])},e}({});

@@ -7,5 +7,5 @@ 'use strict';

var dlv = _interopDefault(require('dlv'));
var storageUtils = require('@analytics/storage-utils');
var storageUtils__default = _interopDefault(storageUtils);
var dlv = _interopDefault(require('dlv'));

@@ -478,33 +478,8 @@ function _typeof(obj) {

// const context = (typeof self === 'object' && self.self === self && self) || // eslint-disable-line
/* global self globalThis */
var getGlobal = function getGlobal() {
/* eslint-disable */
if (typeof self !== 'undefined' && self) {
return self;
}
/* eslint-enable */
if (inBrowser && window) {
return window;
}
if (inBrowser && global) {
return global;
}
if (typeof globalThis !== 'undefined' && globalThis) {
return globalThis;
}
};
var globalContext = getGlobal();
exports.dotProp = dlv;
exports.storage = storageUtils__default;
exports.getCookie = storageUtils.getCookie;
exports.setCookie = storageUtils.setCookie;
exports.globalContext = storageUtils.globalContext;
exports.removeCookie = storageUtils.removeCookie;
exports.dotProp = dlv;
exports.isFunction = isFunction;

@@ -529,2 +504,1 @@ exports.isString = isString;

exports.uuid = uuid;
exports.globalContext = globalContext;

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

export { default as storage, getCookie, setCookie, removeCookie } from '@analytics/storage-utils';
export { default as dotProp } from 'dlv';
export { default as storage, getCookie, setCookie, globalContext, removeCookie } from '@analytics/storage-utils';

@@ -470,28 +470,2 @@ function _typeof(obj) {

// const context = (typeof self === 'object' && self.self === self && self) || // eslint-disable-line
/* global self globalThis */
var getGlobal = function getGlobal() {
/* eslint-disable */
if (typeof self !== 'undefined' && self) {
return self;
}
/* eslint-enable */
if (inBrowser && window) {
return window;
}
if (inBrowser && global) {
return global;
}
if (typeof globalThis !== 'undefined' && globalThis) {
return globalThis;
}
};
var globalContext = getGlobal();
export { isFunction, isString, isObject, isUndefined, isBoolean, decode as decodeUri, getBrowserLocale, getTimeZone, inBrowser, isExternalReferrer, isScriptLoaded, noOp, paramsClean, getValueParamValue as paramsGet, paramsParse, paramsRemove, parseReferrer, url, uuid, globalContext };
export { isFunction, isString, isObject, isUndefined, isBoolean, decode as decodeUri, getBrowserLocale, getTimeZone, inBrowser, isExternalReferrer, isScriptLoaded, noOp, paramsClean, getValueParamValue as paramsGet, paramsParse, paramsRemove, parseReferrer, url, uuid };

@@ -7,5 +7,5 @@ 'use strict';

var dlv = _interopDefault(require('dlv'));
var storageUtils = require('@analytics/storage-utils');
var storageUtils__default = _interopDefault(storageUtils);
var dlv = _interopDefault(require('dlv'));

@@ -478,33 +478,8 @@ function _typeof(obj) {

// const context = (typeof self === 'object' && self.self === self && self) || // eslint-disable-line
/* global self globalThis */
var getGlobal = function getGlobal() {
/* eslint-disable */
if (typeof self !== 'undefined' && self) {
return self;
}
/* eslint-enable */
if (inBrowser && window) {
return window;
}
if (inBrowser && global) {
return global;
}
if (typeof globalThis !== 'undefined' && globalThis) {
return globalThis;
}
};
var globalContext = getGlobal();
exports.dotProp = dlv;
exports.storage = storageUtils__default;
exports.getCookie = storageUtils.getCookie;
exports.setCookie = storageUtils.setCookie;
exports.globalContext = storageUtils.globalContext;
exports.removeCookie = storageUtils.removeCookie;
exports.dotProp = dlv;
exports.isFunction = isFunction;

@@ -529,2 +504,1 @@ exports.isString = isString;

exports.uuid = uuid;
exports.globalContext = globalContext;

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

export { default as storage, getCookie, setCookie, removeCookie } from '@analytics/storage-utils';
export { default as dotProp } from 'dlv';
export { default as storage, getCookie, setCookie, globalContext, removeCookie } from '@analytics/storage-utils';

@@ -470,28 +470,2 @@ function _typeof(obj) {

// const context = (typeof self === 'object' && self.self === self && self) || // eslint-disable-line
/* global self globalThis */
var getGlobal = function getGlobal() {
/* eslint-disable */
if (typeof self !== 'undefined' && self) {
return self;
}
/* eslint-enable */
if (inBrowser && window) {
return window;
}
if (inBrowser && global) {
return global;
}
if (typeof globalThis !== 'undefined' && globalThis) {
return globalThis;
}
};
var globalContext = getGlobal();
export { isFunction, isString, isObject, isUndefined, isBoolean, decode as decodeUri, getBrowserLocale, getTimeZone, inBrowser, isExternalReferrer, isScriptLoaded, noOp, paramsClean, getValueParamValue as paramsGet, paramsParse, paramsRemove, parseReferrer, url, uuid, globalContext };
export { isFunction, isString, isObject, isUndefined, isBoolean, decode as decodeUri, getBrowserLocale, getTimeZone, inBrowser, isExternalReferrer, isScriptLoaded, noOp, paramsClean, getValueParamValue as paramsGet, paramsParse, paramsRemove, parseReferrer, url, uuid };
{
"name": "analytics-utils",
"version": "0.2.1",
"version": "0.2.2",
"description": "Analytics utility functions used by 'analytics' module",

@@ -60,6 +60,6 @@ "author": "David Wells <hello@davidwells.io>",

"dependencies": {
"@analytics/storage-utils": "^0.2.3",
"@analytics/storage-utils": "^0.2.4",
"dlv": "^1.1.3"
},
"gitHead": "87459c32ebb46f245634869ef90393b0bdc26bf9"
"gitHead": "6235efa2a3431d781a29a91c82e4aeb2b2aec1d9"
}
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