gd-bs 6.6.19 → 6.6.21

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.
@@ -2,9 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.generateIcon = void 0;
4
4
  // Generates the html for an icon
5
- var generateIcon = function (svg, height, width, className) {
5
+ var generateIcon = function (svg, height, width, className, placeholders) {
6
6
  if (height === void 0) { height = 32; }
7
7
  if (width === void 0) { width = 32; }
8
+ // See if placeholders exist
9
+ if (placeholders > 0) {
10
+ // Parse the number of placeholders
11
+ for (var i = 0; i < placeholders; i++) {
12
+ var regex = new RegExp("/\{" + i + "\}/g");
13
+ // Replace the placeholder
14
+ svg = svg.replace(regex, Date.now().toString());
15
+ }
16
+ }
8
17
  // Get the icon element
9
18
  var elDiv = document.createElement("div");
10
19
  elDiv.innerHTML = svg;