Socket
Socket
Sign inDemoInstall

@adv-ui/vendor-by-consents-loader

Package Overview
Dependencies
38
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.2.0

lib/vendors/comscore.js

4

lib/index.js
// export * from './server.js'
export * from './client.js';
export * from './comscore.js';
export * from './events.js';
export * from './events.js';
export * from './vendors/comscore.js';
{
"name": "@adv-ui/vendor-by-consents-loader",
"version": "0.1.0",
"version": "0.2.0",
"description": "Load vendors according to the allowed user's consents",

@@ -9,3 +9,5 @@ "main": "lib/index.js",

"lib": "npx rimraf ./lib && npx mkdirp ./lib && babel --presets sui ./src --out-dir ./lib",
"prepare": "npm run lib",
"lint": "sui-lint js",
"prepare": "npm run lib && npm run umd",
"umd": "sui-bundler lib src-umd/index.js -o umd/ -p --root",
"test": "echo \"Error: no test specified\""

@@ -21,3 +23,4 @@ },

"devDependencies": {
"@babel/cli": "7.12.1",
"@babel/cli": "7",
"@s-ui/bundler": "6",
"@s-ui/lint": "3",

@@ -45,3 +48,8 @@ "@s-ui/mono": "1",

"extends": "./node_modules/@s-ui/lint/stylelint.config.js"
},
"config": {
"sui-mono": {
"access": "public"
}
}
}

@@ -56,2 +56,31 @@ **⚠️ Important: This is a work in progress package that could face changes. Please, use the exact semantic version until it gets to 1.0.0 package version**

## Using it in Monolithic apps
```html
// First load the UMD module.
<script src="https://unpkg.com/@adv-ui/vendor-by-consents-loader/umd/index.js"></script>
<script>
// load comscore
window.sui.vendors.loadComscore({comscoreClientId: '7109919'})
// init vendors loader by consents
window.sui.vendors.initVendorConsentsLoader({
vendors: {
tealium: {
script: 'https://frtassets.fotocasa.es/external-scripts/utag-pro.js',
consents: {
purposes: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
specialFeatureOptins: [1]
}
},
}
})
// add evento for listening comscore load
window.sui.vendors.addVendorLoadedEventListener(({vendor}) => {
vendor === 'comscore' && console.log('Comscore has been loaded')
})
//
</script>
```
## List of Purposes

@@ -58,0 +87,0 @@

// export * from './server.js'
export * from './client.js'
export * from './comscore.js'
export * from './events.js'
export * from './vendors/comscore.js'

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc