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

@financial-times/ads-display

Package Overview
Dependencies
Maintainers
18
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/ads-display - npm Package Compare versions

Comparing version 4.0.0-beta.1 to 4.0.0-beta.2

22

dist/client.js

@@ -20,6 +20,14 @@ import oTracking from '@financial-times/o-tracking';

* Returns the margin to apply to the viewport as a percentage string given an object of sizes
* @param {Object} breakpointMargins object with size as key and margin to apply as a value if the size is lower than the breakpoint
* example: { 700: '15%', 500: '10%'} if the viewport size is under 500px then 10% will be applied
* @param {Int} viewportSize current viewport size
* @returns {String} Percentage of margin to apply
*
* breakpointMargins: object with size as key and margin to apply as a value if
* the size is lower than the breakpoint
* Example:
* { 700: '15%', 500: '10%' } if the viewport size is under 500px then 10% will be applied
*
* @param {{
* breakpointMargins: Record<string, string>,
* viewportSize: number,
* fallbackValue: string
* }} props
* @returns {string} Percentage of margin to apply
*/

@@ -35,6 +43,6 @@ const calculateViewportMargin = ({

// find the size that is just higher than the viewportsize
// Find the size that is just higher than the viewportsize
const nextHighestBreakpointKey = Object.keys(breakpointMargins)
.sort()
.find((a) => a > viewportSize);
.find((a) => +a > viewportSize);

@@ -71,3 +79,3 @@ return breakpointMargins[nextHighestBreakpointKey] || fallbackValue

*/
function hideIframedImagesBelow(collapseBelow = 600) {
function hideIframedImagesBelow(collapseBelow = 740) {
/**

@@ -74,0 +82,0 @@ * @type {EventListener}

@@ -1,11 +0,6 @@

module.exports = {
clearMocks: true,
coverageProvider: "v8",
testEnvironment: "jest-environment-jsdom-global",
resolver: "./resolver.js",
"transformIgnorePatterns": [
"node_modules/(?!@financial-times)"
]
};
clearMocks: true,
coverageProvider: 'v8',
resolver: './resolver.js',
transformIgnorePatterns: ['node_modules/(?!@financial-times)'],
}
{
"name": "@financial-times/ads-display",
"version": "4.0.0-beta.1",
"version": "4.0.0-beta.2",
"description": "Bring ads to your page with the FT specific o-ads configuration",

@@ -40,5 +40,5 @@ "browser": "dist/client.js",

"dependencies": {
"@financial-times/ads-legacy-o-ads": "^4.0.0-beta.1",
"@financial-times/ads-moat-integration": "^4.0.0-beta.1",
"@financial-times/ads-permutive": "^4.0.0-beta.1",
"@financial-times/ads-legacy-o-ads": "^4.0.0-beta.2",
"@financial-times/ads-moat-integration": "^4.0.0-beta.2",
"@financial-times/ads-permutive": "^4.0.0-beta.2",
"@financial-times/n-tracking": "4.0.0",

@@ -58,3 +58,2 @@ "@financial-times/o-tracking": "^4.0.0",

"jest": "^26.0.0",
"jest-environment-jsdom-global": "^2.0.4",
"jest-fetch-mock": "^3.0.3",

@@ -61,0 +60,0 @@ "lint-staged": "^10.0.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