macro-parameters 0.0.3 → 0.0.4
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/index.js +1 -9
- package/package.json +1 -4
- package/rollup.config.ts +1 -1
- package/src/main.ts +0 -5
package/index.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsdom = require('jsdom');
|
|
4
|
-
|
|
5
1
|
function getCookie(name) {
|
|
6
2
|
const reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
|
|
7
3
|
let arr;
|
|
@@ -19,10 +15,6 @@ function getLocalStorage(name) {
|
|
|
19
15
|
return null;
|
|
20
16
|
}
|
|
21
17
|
|
|
22
|
-
var JSDOM = jsdom.JSDOM;
|
|
23
|
-
var dom = new JSDOM("<!DOCTYPE html><p>Hello world</p>");
|
|
24
|
-
window = dom.window;
|
|
25
|
-
document = window.document;
|
|
26
18
|
var PlaceHolders = {
|
|
27
19
|
"[tv_domain]": function () {
|
|
28
20
|
return document.domain;
|
|
@@ -181,4 +173,4 @@ var MacroSubstitution = /** @class */ (function () {
|
|
|
181
173
|
return MacroSubstitution;
|
|
182
174
|
}());
|
|
183
175
|
|
|
184
|
-
|
|
176
|
+
export { MacroSubstitution as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "macro-parameters",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Provide unified macro parameter retrieval",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,8 +12,5 @@
|
|
|
12
12
|
"rollup": "^4.21.1",
|
|
13
13
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
14
14
|
"typescript": "^5.5.4"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"jsdom": "^25.0.0"
|
|
18
15
|
}
|
|
19
16
|
}
|
package/rollup.config.ts
CHANGED
package/src/main.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { getCookie, getLocalStorage } from "../script/utils"
|
|
2
|
-
import jsdom from "jsdom";
|
|
3
|
-
const { JSDOM } = jsdom;
|
|
4
|
-
const dom = new JSDOM(`<!DOCTYPE html><p>Hello world</p>`);
|
|
5
|
-
window = dom.window;
|
|
6
|
-
document = window.document;
|
|
7
2
|
const PlaceHolders: any = {
|
|
8
3
|
"[tv_domain]"() {
|
|
9
4
|
return document.domain
|