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

@vkontakte/vkjs

Package Overview
Dependencies
Maintainers
4
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vkontakte/vkjs - npm Package Compare versions

Comparing version 0.28.0 to 0.29.0

1

lib/cookie.d.ts
export declare function getCookie(name: string): string | undefined;
export declare const isCookieEnabled: () => boolean;

@@ -7,2 +7,3 @@ "use strict";

exports.getCookie = getCookie;
exports.isCookieEnabled = void 0;
function getCookie(name) {

@@ -12,2 +13,16 @@ var matches = document.cookie.match(new RegExp('(?:^|; )' + name.replace(/([.$?*|{}()\[\]\\\/+^])/g, '\\$1') + '=([^;]*)'));

}
var isCookieEnabledCache = null;
var isCookieEnabled = function isCookieEnabled() {
if (isCookieEnabledCache === null) {
try {
document.cookie = 'cookietest=1';
isCookieEnabledCache = document.cookie.indexOf('cookietest=') !== -1;
document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
} catch (e) {
isCookieEnabledCache = false;
}
}
return isCookieEnabledCache;
};
exports.isCookieEnabled = isCookieEnabled;
//# sourceMappingURL=cookie.js.map

@@ -5,2 +5,15 @@ export function getCookie(name) {

}
var isCookieEnabledCache = null;
export var isCookieEnabled = function isCookieEnabled() {
if (isCookieEnabledCache === null) {
try {
document.cookie = 'cookietest=1';
isCookieEnabledCache = document.cookie.indexOf('cookietest=') !== -1;
document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
} catch (e) {
isCookieEnabledCache = false;
}
}
return isCookieEnabledCache;
};
//# sourceMappingURL=cookie.js.map

2

lib/es6/index.js

@@ -26,3 +26,3 @@ export { animate, animationEvent, transitionEvent, waitAnimationEnd, cancelWaitAnimationEnd, waitTransitionEnd, cancelWaitTransitionEnd } from './animate';

export { asyncImportLoader } from './async';
export { getCookie } from './cookie';
export { getCookie, isCookieEnabled } from './cookie';
export { SECONDS_IN_THE_DAY, isDateToday, isDateYesterday, isDateTomorrow, isSameDate, getBeginningOfDay, isLeapYear, getLastDayOfMonth, getStartOfWeek, addDays, createDateFromUnixTimestamp, getUnixTimestampFromDate, convertDateToInputFormat } from './date';

@@ -29,0 +29,0 @@ export { formatDuration } from './duration';

@@ -10,3 +10,3 @@ export { animate, animationEvent, transitionEvent, waitAnimationEnd, cancelWaitAnimationEnd, waitTransitionEnd, cancelWaitTransitionEnd, } from './animate';

export { asyncImportLoader } from './async';
export { getCookie } from './cookie';
export { getCookie, isCookieEnabled } from './cookie';
export { SECONDS_IN_THE_DAY, isDateToday, isDateYesterday, isDateTomorrow, isSameDate, getBeginningOfDay, isLeapYear, getLastDayOfMonth, getStartOfWeek, addDays, createDateFromUnixTimestamp, getUnixTimestampFromDate, convertDateToInputFormat, } from './date';

@@ -13,0 +13,0 @@ export { formatDuration } from './duration';

@@ -294,2 +294,8 @@ "use strict";

});
Object.defineProperty(exports, "isCookieEnabled", {
enumerable: true,
get: function get() {
return _cookie.isCookieEnabled;
}
});
Object.defineProperty(exports, "isDateToday", {

@@ -296,0 +302,0 @@ enumerable: true,

{
"name": "@vkontakte/vkjs",
"version": "0.28.0",
"version": "0.29.0",
"description": "VK shared JS libs",

@@ -119,5 +119,5 @@ "main": "lib/index.js",

"resolutions": {
"@typescript-eslint/eslint-plugin": "5.42.0",
"@typescript-eslint/eslint-plugin": "5.43.0",
"@typescript-eslint/parser": "5.42.0"
}
}

@@ -7,1 +7,19 @@ export function getCookie(name: string): string | undefined {

}
let isCookieEnabledCache: boolean | null = null;
export const isCookieEnabled = () => {
if (isCookieEnabledCache === null) {
try {
document.cookie = 'cookietest=1';
isCookieEnabledCache = document.cookie.indexOf('cookietest=') !== -1;
document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
} catch (e) {
isCookieEnabledCache = false;
}
}
return isCookieEnabledCache;
};

@@ -47,3 +47,3 @@ export {

export { getCookie } from './cookie';
export { getCookie, isCookieEnabled } from './cookie';

@@ -50,0 +50,0 @@ export {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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