@folklore/ads 0.0.62 → 0.0.63

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.
package/dist/cjs.js CHANGED
@@ -287,6 +287,7 @@ class AdsManager extends EventEmitter__default["default"] {
287
287
  // return newId;
288
288
  // }
289
289
 
290
+ static ID_PREFIX = 'div-gpt-ad-';
290
291
  static getArticleTargeting(article) {
291
292
  if (article === null) {
292
293
  return null;
@@ -360,7 +361,7 @@ class AdsManager extends EventEmitter__default["default"] {
360
361
  // const newId = `div-gpt-ad-${new Date().getTime()}-${Math.round(
361
362
  // Math.random() * (Math.random() * 1000),
362
363
  // )}-${this.index}`;
363
- const newId = `div-gpt-ad-${this.index}`;
364
+ const newId = `${AdsManager.ID_PREFIX}${this.index}`;
364
365
  this.index += 1;
365
366
  return newId;
366
367
  }
package/dist/es.js CHANGED
@@ -269,6 +269,7 @@ class AdsManager extends EventEmitter {
269
269
  // return newId;
270
270
  // }
271
271
 
272
+ static ID_PREFIX = 'div-gpt-ad-';
272
273
  static getArticleTargeting(article) {
273
274
  if (article === null) {
274
275
  return null;
@@ -342,7 +343,7 @@ class AdsManager extends EventEmitter {
342
343
  // const newId = `div-gpt-ad-${new Date().getTime()}-${Math.round(
343
344
  // Math.random() * (Math.random() * 1000),
344
345
  // )}-${this.index}`;
345
- const newId = `div-gpt-ad-${this.index}`;
346
+ const newId = `${AdsManager.ID_PREFIX}${this.index}`;
346
347
  this.index += 1;
347
348
  return newId;
348
349
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@folklore/ads",
3
- "version": "0.0.62",
3
+ "version": "0.0.63",
4
4
  "description": "Ads library",
5
5
  "keywords": [
6
6
  "javascript",
@@ -50,7 +50,7 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "db9d1c6c7ec6018ab00e67f5992bfd1544770c12",
53
+ "gitHead": "5758c6b7d203e04862d82991e990b9f806485da3",
54
54
  "dependencies": {
55
55
  "@folklore/hooks": "^0.0.58",
56
56
  "@folklore/tracking": "^0.0.23",