Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@financial-times/dotcom-server-app-context

Package Overview
Dependencies
Maintainers
18
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/dotcom-server-app-context - npm Package Compare versions

Comparing version 0.2.3 to 0.3.0

2

dist/node/AppContext.js

@@ -11,3 +11,3 @@ "use strict";

this.data = {};
const data = filterEmptyData_1.default({ ...options.context });
const data = filterEmptyData_1.default({ ...options.appContext });
for (const [property, value] of Object.entries(data)) {

@@ -14,0 +14,0 @@ this.set(property, value);

@@ -59,2 +59,7 @@ {

},
"isUserLoggedIn": {
"type": "boolean",
"description": "If the visitor is signed in to an FT account",
"default": false
},
"product": {

@@ -61,0 +66,0 @@ "type": "string",

{
"name": "@financial-times/dotcom-server-app-context",
"version": "0.2.3",
"version": "0.3.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/node/index.js",

@@ -11,3 +11,3 @@ # FT App Context Schema

* Regex pattern: `^([0-9A-Za-z]+:[0-9A-Za-z]+,?)+$`
* Regex pattern: `^,*([0-9A-Za-z-_]+:[0-9A-Za-z-_]+,*)+$`

@@ -76,2 +76,8 @@ ## `appName` (string)

## `isUserLoggedIn` (boolean)
If the visitor is signed in to an FT account
Default: `false`
## `product` (string)

@@ -78,0 +84,0 @@

@@ -6,3 +6,3 @@ import { TAppContext } from './types'

export type TAppContextOptions = {
context?: Partial<TAppContext>
appContext?: Partial<TAppContext>
}

@@ -14,5 +14,5 @@

constructor(options: TAppContextOptions = {}) {
const data = filterEmptyData({ ...options.context })
const data = filterEmptyData({ ...options.appContext })
for (const [ property, value ] of Object.entries(data)) {
for (const [property, value] of Object.entries(data)) {
this.set(property, value)

@@ -19,0 +19,0 @@ }

@@ -59,2 +59,7 @@ {

},
"isUserLoggedIn": {
"type": "boolean",
"description": "If the visitor is signed in to an FT account",
"default": false
},
"product": {

@@ -61,0 +66,0 @@ "type": "string",

@@ -12,4 +12,5 @@ export interface TAppContext {

isProduction: boolean
isUserLoggedIn?: boolean
publishReference?: string
[key: string]: any
}
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