@denimlabs/fb-position-validation
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@denimlabs/fb-position-validation", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Validate facebook positions against denim campaign objectives.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,25 +0,44 @@ | ||
# denim-package-name | ||
# fb-position-validation | ||
Description | ||
This package will validate against Denim objectives and facebook placment options | ||
## Getting Started | ||
`yarn add denim-package-name` | ||
`yarn add @denimlabs/fb-position-validation` | ||
### Prerequisites | ||
None | ||
### Installing | ||
Clone the repo | ||
``` | ||
git clone https://github.com/denimlabs/denim-package-name.git | ||
``` | ||
import {validateAllRulesByObjective} from 'fb-position-validation' | ||
import | ||
const positioning = { | ||
facebook_positions: [ | ||
'feed', | ||
'suggested_video', | ||
'instant_article', | ||
'instream_video', | ||
'story' | ||
], | ||
instagram_positions: ['stream'], | ||
audience_network_positions: ['classic', 'instream_video'], | ||
messenger_positions: ['messenger_home'] | ||
} | ||
const objective = 'Awareness' | ||
validateAllRulesByObjective(objective, positioning) | ||
//will throw error if not valid. | ||
``` | ||
import denimPackageName from 'denim-package-name' | ||
If you are only interested in what is valid for a particular objective you can do any of the three following: | ||
``` | ||
const validPositions = getValidPositionsForObjective(objective) | ||
const validDevicePlatforms = getValidDevicePlatformsForObjective(objective) | ||
const validPublisherPlatforms = getValidPublisherPlatformsForObjective(objective) | ||
``` | ||
@@ -35,13 +54,5 @@ ## Running the tests | ||
## Built With | ||
* [node](https://nodejs.org/api/https.html) - Node 9.2.0 | ||
* [babel-cli](https://www.npmjs.com/package/babel-cli) - Used for transpiling and running es6 | ||
* [babel-preset-env](https://www.npmjs.com/package/babel-preset-env) - Used for transpiling and running es6 | ||
* [jest](https://www.npmjs.com/package/jest) - Testing framework | ||
* [chai](http://chaijs.com/) - Assertion Library | ||
* [husky](https://www.npmjs.com/package/husky) - Pre-commit hooks | ||
* [lint-staged](https://www.npmjs.com/package/lint-staged) - Linting for changed files | ||
* [fs](https://www.npmjs.com/package/fs) - node file system module | ||
* [chalk](https://www.npmjs.com/package/chalk) - Colored console output | ||
* [commitizen](https://www.npmjs.com/package/commitizen) - commit log standards | ||
:love: | ||
## Versioning | ||
@@ -59,3 +70,3 @@ | ||
Copyright (c) 2017 DenimLabs mclark@denimlabs.com | ||
Copyright (c) 2018 DenimLabs mclark@denimlabs.com | ||
@@ -62,0 +73,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
77
24150