Skip to content

Commit 498add2

Browse files
JeanMeijeradriaandotcom
authored andcommitted
chore: build with changes
1 parent 4bfa39d commit 498add2

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

dist/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ const injectScript = (app, domain, options) => {
4343
el.async = true;
4444
el.src = "https://" + domain + "/latest.js";
4545
const attributes = parseOptions(options);
46-
Object.entries(attributes).forEach(([key, value]) => {
46+
for (const key in attributes) {
47+
const value = attributes[key];
4748
if (value) el.setAttribute(key, value);
48-
});
49+
}
4950
document.head.appendChild(el);
5051

5152
// Add a global 'saEvent' method when the script has been loaded
@@ -97,5 +98,4 @@ var index = {
9798
};
9899

99100
exports.default = index;
100-
exports.parseOptions = parseOptions;
101101
exports.saEventKey = saEventKey;

dist/index.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ const injectScript = (app, domain, options) => {
3939
el.async = true;
4040
el.src = "https://" + domain + "/latest.js";
4141
const attributes = parseOptions(options);
42-
Object.entries(attributes).forEach(([key, value]) => {
42+
for (const key in attributes) {
43+
const value = attributes[key];
4344
if (value) el.setAttribute(key, value);
44-
});
45+
}
4546
document.head.appendChild(el);
4647

4748
// Add a global 'saEvent' method when the script has been loaded
@@ -92,4 +93,4 @@ var index = {
9293
},
9394
};
9495

95-
export { index as default, parseOptions, saEventKey };
96+
export { index as default, saEventKey };

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* globals document */
22
export const saEventKey = Symbol('saEvent');
33

4-
export function parseOptions(options) {
4+
function parseOptions(options) {
55
const metrics = options.ignoreMetrics
66
? Object.entries(options.ignoreMetrics)
77
.filter(([_, value]) => value)

0 commit comments

Comments
 (0)