tiny-spark-kit 0.1.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
+ export type SparkLevel = "sleepy" | "normal" | "turbo";
2
+ export declare function sparkStatus(name: string, level: SparkLevel): string;
3
+ export declare function tinyWin(points: number): string;
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ const MOODS = {
2
+ sleepy: "low battery mode",
3
+ normal: "steady focus",
4
+ turbo: "shipping mode"
5
+ };
6
+ export function sparkStatus(name, level) {
7
+ const cleanName = name.trim() || "anonymous dev";
8
+ return `${cleanName}: ${MOODS[level]}`;
9
+ }
10
+ export function tinyWin(points) {
11
+ if (points <= 0) {
12
+ return "no win yet";
13
+ }
14
+ if (points < 5) {
15
+ return "small win";
16
+ }
17
+ return "big win";
18
+ }
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "tiny-spark-kit",
3
+ "version": "0.1.0",
4
+ "description": "A tiny TypeScript package with fun helpers for CI demos.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "tsc -p tsconfig.json",
13
+ "test": "vitest run",
14
+ "test:watch": "vitest",
15
+ "prepare": "npm run build"
16
+ },
17
+ "keywords": [
18
+ "typescript",
19
+ "fun",
20
+ "utilities"
21
+ ],
22
+ "license": "MIT",
23
+ "devDependencies": {
24
+ "@types/node": "^24.5.2",
25
+ "typescript": "^5.9.2",
26
+ "vitest": "^3.2.4"
27
+ }
28
+ }