Socket
Socket
Sign inDemoInstall

@domql/utils

Package Overview
Dependencies
Maintainers
1
Versions
168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@domql/utils - npm Package Compare versions

Comparing version 2.5.93 to 2.5.94

1

cookie.js
'use strict'
import { isUndefined } from './types'
import { document } from '@domql/utils'

@@ -5,0 +6,0 @@ export const isMobile = (() => typeof navigator === 'undefined'

9

dist/cjs/cookie.js

@@ -27,5 +27,6 @@ "use strict";

var import_types = require("./types");
var import_utils = require("@domql/utils");
const isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
const setCookie = (cname, cvalue, exdays = 365) => {
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
if ((0, import_types.isUndefined)(import_utils.document) || (0, import_types.isUndefined)(import_utils.document.cookie))
return;

@@ -35,9 +36,9 @@ const d = /* @__PURE__ */ new Date();

const expires = `expires=${d.toUTCString()}`;
document.cookie = `${cname}=${cvalue};${expires};path=/`;
import_utils.document.cookie = `${cname}=${cvalue};${expires};path=/`;
};
const getCookie = (cname) => {
if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
if ((0, import_types.isUndefined)(import_utils.document) || (0, import_types.isUndefined)(import_utils.document.cookie))
return;
const name = `${cname}=`;
const decodedCookie = decodeURIComponent(document.cookie);
const decodedCookie = decodeURIComponent(import_utils.document.cookie);
const ca = decodedCookie.split(";");

@@ -44,0 +45,0 @@ for (let i = 0; i < ca.length; i++) {

@@ -6,4 +6,4 @@ 'use strict'

const window = globalThis
const document = window.document // eslint-disable-line
const document = (this || window).document // eslint-disable-line
export { global, self, window, document }
{
"name": "@domql/utils",
"version": "2.5.93",
"version": "2.5.94",
"license": "MIT",

@@ -26,3 +26,3 @@ "type": "module",

},
"gitHead": "6c5a9e10c74137700ad69ff9108b6ccc09745cc7",
"gitHead": "76edeab829524b706fd1a0bd3fac3fd5563a3b84",
"devDependencies": {

@@ -29,0 +29,0 @@ "@babel/core": "^7.12.0"

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