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

@fenderdigital/cookies

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fenderdigital/cookies - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

2

es/cookies.js

@@ -11,3 +11,3 @@ import Cookies from 'universal-cookie';

function getCountryCode() {
var country = cookies.get('countryCode');
var country = cookies.get('country_code');
if (!country) {

@@ -14,0 +14,0 @@ country = 'US';

@@ -19,3 +19,3 @@ 'use strict';

function getCountryCode() {
var country = cookies.get('countryCode');
var country = cookies.get('country_code');
if (!country) {

@@ -22,0 +22,0 @@ country = 'US';

@@ -16,3 +16,3 @@ {

},
"version": "1.1.0",
"version": "1.2.0",
"dependencies": {

@@ -19,0 +19,0 @@ "universal-cookie": "^3.0.7"

@@ -6,14 +6,14 @@ import getCountryCode from '../cookies';

describe('getCountryCode', () => {
it('returns US country code when countryCode cookie is undefined', () => {
it('returns US country code when country_code cookie is undefined', () => {
let cookie = new Cookies();
expect(getCountryCode()).toEqual('US');
});
it('returns US country code when countryCode cookie value is "US"', () => {
it('returns US country code when country_code cookie value is "US"', () => {
let cookie = new Cookies();
cookie.set('countryCode', 'US');
cookie.set('country_code', 'US');
expect(getCountryCode()).toEqual('US');
});
it('returns PH country code when countryCode cookie value is "PH"', () => {
it('returns PH country code when country_code cookie value is "PH"', () => {
let cookie = new Cookies();
cookie.set('countryCode', 'PH');
cookie.set('country_code', 'PH');
expect(getCountryCode()).toEqual('PH');

@@ -20,0 +20,0 @@ });

@@ -11,3 +11,3 @@ import Cookies from 'universal-cookie';

function getCountryCode() {
let country = cookies.get('countryCode');
let country = cookies.get('country_code');
if (!country) {

@@ -14,0 +14,0 @@ country = 'US';

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