@blotoutio/providers-live-intent-sdk 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +11 -0
  2. package/index.js +54 -0
  3. package/package.json +21 -0
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # providers-live-intent-sdk
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test providers-live-intent-sdk` to execute the unit tests via [Jest](https://jestjs.io).
8
+
9
+ ## Running lint
10
+
11
+ Run `nx lint providers-live-intent-sdk` to execute the lint via [ESLint](https://eslint.org/).
package/index.js ADDED
@@ -0,0 +1,54 @@
1
+ var ProvidersLiveIntentSdk = (function () {
2
+ 'use strict';
3
+
4
+ const getCookieValue = (key) => {
5
+ try {
6
+ if (!document || !document.cookie) {
7
+ return '';
8
+ }
9
+ const name = `${key}=`;
10
+ const decodedCookie = decodeURIComponent(document.cookie);
11
+ const ca = decodedCookie.split(';');
12
+ for (let i = 0; i < ca.length; i++) {
13
+ let c = ca[i];
14
+ while (c.charAt(0) === ' ') {
15
+ c = c.substring(1);
16
+ }
17
+ if (c.indexOf(name) === 0) {
18
+ return c.substring(name.length, c.length);
19
+ }
20
+ }
21
+ return '';
22
+ }
23
+ catch (_a) {
24
+ return '';
25
+ }
26
+ };
27
+
28
+ const tag = () => {
29
+ const isLoaded = window && window.LI && !!getCookieValue('lidid');
30
+ return {
31
+ loaded: isLoaded,
32
+ sdkVersion: "0.16.2" ,
33
+ };
34
+ };
35
+
36
+ const data = {
37
+ name: 'liveIntent',
38
+ tag,
39
+ };
40
+ try {
41
+ if (window) {
42
+ if (!window.edgetagProviders) {
43
+ window.edgetagProviders = [];
44
+ }
45
+ window.edgetagProviders.push(data);
46
+ }
47
+ }
48
+ catch (_a) {
49
+ // No window
50
+ }
51
+
52
+ return data;
53
+
54
+ })();
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@blotoutio/providers-live-intent-sdk",
3
+ "version": "0.16.2",
4
+ "description": "LiveIntent Browser SDK for EdgeTag",
5
+ "author": "Blotout",
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/blotoutio/edgetag-sdk",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "main": "./index.js",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/blotoutio/edgetag-sdk.git"
15
+ },
16
+ "files": [
17
+ "index.js",
18
+ "package.json",
19
+ "README.md"
20
+ ]
21
+ }