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

@denimlabs/media-validation-engine

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@denimlabs/media-validation-engine - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

37

dist/video-validation.js

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

exports.isVideoInstagramStoriesValid = isVideoInstagramStoriesValid;
exports.isVideoInstagramFeedValid = isVideoInstagramFeedValid;
exports.isVideoAudienceNetworkNativeBannerAndInterstitalValid = isVideoAudienceNetworkNativeBannerAndInterstitalValid;

@@ -197,5 +198,27 @@ exports.isVideoAudienceNetworkInStreamValid = isVideoAudienceNetworkInStreamValid;

function isVideoAudienceNetworkNativeBannerAndInterstitalValid(_ref9) {
function isVideoInstagramFeedValid(_ref9) {
var lengthInSeconds = _ref9.lengthInSeconds,
fileSizeInBytes = _ref9.fileSizeInBytes;
var minLength = 1;
var maxLength = 120;
var maxFileSize = (0, _utils.gbToBytes)(4);
if (lengthInSeconds < minLength) {
return false;
}
if (lengthInSeconds > maxLength) {
return false;
}
if (fileSizeInBytes > maxFileSize) {
return false;
}
return true;
}
function isVideoAudienceNetworkNativeBannerAndInterstitalValid(_ref10) {
var lengthInSeconds = _ref10.lengthInSeconds,
fileSizeInBytes = _ref10.fileSizeInBytes;
var minLength = 10;

@@ -220,5 +243,5 @@ var maxLength = 121;

function isVideoAudienceNetworkInStreamValid(_ref10) {
var lengthInSeconds = _ref10.lengthInSeconds,
fileSizeInBytes = _ref10.fileSizeInBytes;
function isVideoAudienceNetworkInStreamValid(_ref11) {
var lengthInSeconds = _ref11.lengthInSeconds,
fileSizeInBytes = _ref11.fileSizeInBytes;
var minLength = 5;

@@ -243,5 +266,5 @@ var maxLength = 30;

function isVideoMessengerInboxValid(_ref11) {
var lengthInSeconds = _ref11.lengthInSeconds,
fileSizeInBytes = _ref11.fileSizeInBytes;
function isVideoMessengerInboxValid(_ref12) {
var lengthInSeconds = _ref12.lengthInSeconds,
fileSizeInBytes = _ref12.fileSizeInBytes;
var minLength = 1;

@@ -248,0 +271,0 @@ var maxLength = (0, _utils.minutesToSeconds)(240);

2

package.json
{
"name": "@denimlabs/media-validation-engine",
"version": "1.0.3",
"version": "1.0.4",
"description": "run validation rules against various ad network placements. Specific to facebook, instagram, messenger, single image, carousel images, and video formats.",

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

@@ -45,2 +45,3 @@ import {

isVideoInstagramStoriesValid,
isVideoInstagramFeedValid,
isVideoAudienceNetworkNativeBannerAndInterstitalValid,

@@ -47,0 +48,0 @@ isVideoAudienceNetworkInStreamValid,

@@ -187,2 +187,25 @@ import { minutesToSeconds, gbToBytes } from './utils'

export function isVideoInstagramFeedValid ({
lengthInSeconds,
fileSizeInBytes,
}) {
const minLength = 1
const maxLength = 120
const maxFileSize = gbToBytes(4)
if (lengthInSeconds < minLength) {
return false
}
if (lengthInSeconds > maxLength) {
return false
}
if (fileSizeInBytes > maxFileSize) {
return false
}
return true
}
export function isVideoAudienceNetworkNativeBannerAndInterstitalValid ({

@@ -189,0 +212,0 @@ lengthInSeconds,

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