ghtml 3.0.0 → 3.0.1
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/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Replace your template engine with fast JavaScript by leveraging the power of tagged templates.",
|
|
4
4
|
"author": "Gürgün Dayıoğlu",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "3.0.
|
|
6
|
+
"version": "3.0.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"bin": "./bin/src/index.js",
|
|
9
9
|
"main": "./src/index.js",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"benchmark": "node bench/index.js",
|
|
19
19
|
"test": "npm run lint && c8 --100 node --test test/*.js",
|
|
20
20
|
"lint": "eslint . && prettier --check .",
|
|
21
|
-
"lint:fix": "eslint --fix . && prettier --write ."
|
|
21
|
+
"lint:fix": "eslint --fix . && prettier --write .",
|
|
22
|
+
"typescript": "tsc src/*.js --allowJs --declaration --emitDeclarationOnly"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
25
|
"glob": "^10.4.5"
|
|
@@ -27,7 +28,8 @@
|
|
|
27
28
|
"@fastify/pre-commit": "^2.1.0",
|
|
28
29
|
"c8": "^10.1.2",
|
|
29
30
|
"grules": "^0.23.0",
|
|
30
|
-
"tinybench": "^2.8.0"
|
|
31
|
+
"tinybench": "^2.8.0",
|
|
32
|
+
"typescript": ">=5.5.4"
|
|
31
33
|
},
|
|
32
34
|
"repository": {
|
|
33
35
|
"type": "git",
|
package/src/html.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {{ raw: string[] }} literals Tagged template literals.
|
|
3
|
+
* @param {...any} expressions Expressions to interpolate.
|
|
4
|
+
* @returns {string} The HTML string.
|
|
5
|
+
*/
|
|
6
|
+
export function html({ raw: literals }: {
|
|
7
|
+
raw: string[];
|
|
8
|
+
}, ...expressions: any[]): string;
|
|
9
|
+
/**
|
|
10
|
+
* @param {{ raw: string[] }} literals Tagged template literals.
|
|
11
|
+
* @param {...any} expressions Expressions to interpolate.
|
|
12
|
+
* @yields {string} The HTML strings.
|
|
13
|
+
*/
|
|
14
|
+
export function htmlGenerator({ raw: literals }: {
|
|
15
|
+
raw: string[];
|
|
16
|
+
}, ...expressions: any[]): {};
|
|
17
|
+
/**
|
|
18
|
+
* @param {{ raw: string[] }} literals Tagged template literals.
|
|
19
|
+
* @param {...any} expressions Expressions to interpolate.
|
|
20
|
+
* @yields {string} The HTML strings.
|
|
21
|
+
*/
|
|
22
|
+
export function htmlAsyncGenerator({ raw: literals }: {
|
|
23
|
+
raw: string[];
|
|
24
|
+
}, ...expressions: any[]): {};
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { html, htmlGenerator, htmlAsyncGenerator } from "./html.js";
|