@small-tools/html 1.0.0

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.
@@ -0,0 +1,3 @@
1
+ type Classnames = (classes: Record<string, boolean>) => string;
2
+ declare const classnames: Classnames;
3
+ export { classnames };
@@ -0,0 +1,6 @@
1
+ const classnames = (classes) => {
2
+ const listOfClassNames = Object.keys(classes);
3
+ const filteredListOfClassNames = listOfClassNames.filter((classname) => classes[classname]);
4
+ return filteredListOfClassNames.join(" ");
5
+ };
6
+ export { classnames };
@@ -0,0 +1,4 @@
1
+ type Html = (texts: ReadonlyArray<string>, ...values: ReadonlyArray<string>) => string;
2
+ declare const html: Html;
3
+ export { html };
4
+ export type { Html };
@@ -0,0 +1,2 @@
1
+ const html = (texts, ...values) => String.raw({ raw: texts }, ...values);
2
+ export { html };
@@ -0,0 +1,2 @@
1
+ export * from "./api/classnames.ts";
2
+ export * from "./api/html.ts";
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./api/classnames.js";
2
+ export * from "./api/html.js";
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schemas": "https://www.schemastore.org/package.json",
3
+ "engines": {
4
+ "node": "^23.0.0"
5
+ },
6
+ "name": "@small-tools/html",
7
+ "type": "module",
8
+ "private": false,
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "main": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "files": [
15
+ "./dist"
16
+ ],
17
+ "scripts": {
18
+ "lint": "biome check",
19
+ "build": "tsc --build"
20
+ },
21
+ "version": "1.0.0"
22
+ }