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

@denimlabs/fb-position-validation

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@denimlabs/fb-position-validation - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

46

index.js

@@ -136,3 +136,6 @@ const AwarenessPlacments = {

isDefined(facebook_positions) &&
!(Array.isArray(facebook_positions) && facebook_positions.length === 0)
!(
Array.isArray(facebook_positions) &&
(facebook_positions || []).length === 0
)
) {

@@ -155,3 +158,3 @@ // if facebook_positions are set, make sure they are in the valid list

if (
device_platforms.length === 0 ||
(device_platforms || []).length === 0 ||
device_platforms.includes('mobile')

@@ -177,3 +180,6 @@ ) {

if (device_platforms.length > 0 && !device_platforms.includes('mobile')) {
if (
(device_platforms || []).length > 0 &&
!device_platforms.includes('mobile')
) {
throw Error(

@@ -191,3 +197,6 @@ 'when using instant_article you can not select only desktop.'

}
if (device_platforms.length > 0 && !device_platforms.includes('mobile')) {
if (
(device_platforms || []).length > 0 &&
!device_platforms.includes('mobile')
) {
throw Error('when using marketplace you can not select only desktop.')

@@ -200,3 +209,3 @@ }

// VALIDATE Instagram Positions
if (instagram_positions.length > 0) {
if ((instagram_positions || []).length > 0) {
if (!containsOnlyValid(instagram_positions, VALID_INSTAGRAM_POSTIONS)) {

@@ -219,3 +228,3 @@ throw Error(

// VALIDATE Audience Network Positions
if (audience_network_positions.length > 0) {
if ((audience_network_positions || []).length > 0) {
if (

@@ -234,3 +243,3 @@ !containsOnlyValid(

if (messenger_positions.length > 0) {
if ((messenger_positions || []).length > 0) {
if (!containsOnlyValid(messenger_positions, VALID_MESSENGER_POSITIONS)) {

@@ -245,3 +254,3 @@ throw Error(

if (
publisher_platforms.length > 0 &&
(publisher_platforms || []).length > 0 &&
!publisher_platforms.includes('facebook')

@@ -254,3 +263,3 @@ ) {

if (
facebook_positions.length > 0 &&
(facebook_positions || []).length > 0 &&
!facebook_positions.includes('feed')

@@ -262,3 +271,6 @@ ) {

if (device_platforms.length > 0 && !device_platforms.includes('mobile')) {
if (
(device_platforms || []).length > 0 &&
!device_platforms.includes('mobile')
) {
throw Error(

@@ -282,3 +294,3 @@ 'when using messenger_positions you can not select only desktop.'

if (
publisher_platforms.length > 0 &&
(publisher_platforms || []).length > 0 &&
!publisher_platforms.includes('facebook')

@@ -314,3 +326,3 @@ ) {

if (
device_platforms.length > 0 &&
(device_platforms || []).length > 0 &&
!containsOnlyValid(device_platforms, validDevicePlatforms)

@@ -329,3 +341,3 @@ ) {

if (
publisher_platforms.length > 0 &&
(publisher_platforms || []).length > 0 &&
!containsOnlyValid(publisher_platforms, validPublisherPlatforms)

@@ -354,3 +366,3 @@ ) {

if (facebook_positions.length > 0) {
if ((facebook_positions || []).length > 0) {
if (!containsOnlyValid(facebook_positions, validFacebookPositions)) {

@@ -361,3 +373,3 @@ throw Error('Invalid facebook_positions for this objective')

if (instagram_positions.length > 0) {
if ((instagram_positions || []).length > 0) {
if (!containsOnlyValid(instagram_positions, validInsagramPositions)) {

@@ -368,3 +380,3 @@ throw Error('Invalid instagram_positions for this objective')

if (audience_network_positions.length > 0) {
if ((audience_network_positions || []).length > 0) {
if (

@@ -380,3 +392,3 @@ !containsOnlyValid(

if (messenger_positions.length > 0) {
if ((messenger_positions || []).length > 0) {
if (!containsOnlyValid(messenger_positions, validMessengerPositions)) {

@@ -383,0 +395,0 @@ throw Error('Invalid messenger_positions for this objective')

{
"name": "@denimlabs/fb-position-validation",
"version": "1.0.5",
"version": "1.0.6",
"description": "Validate facebook positions against denim campaign objectives.",

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

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