@jtml/core 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.
- package/LICENSE +21 -0
- package/README.md +370 -0
- package/dist/chunk-SHDXMADE.mjs +675 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +684 -0
- package/dist/cli.mjs +168 -0
- package/dist/index.d.mts +262 -0
- package/dist/index.d.ts +262 -0
- package/dist/index.js +726 -0
- package/dist/index.mjs +58 -0
- package/package.json +62 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
JTMLDecoder,
|
|
3
|
+
JTMLEncoder,
|
|
4
|
+
JTMLError,
|
|
5
|
+
SchemaManager,
|
|
6
|
+
TYPE_MAP,
|
|
7
|
+
analyzeTokens,
|
|
8
|
+
calculateEfficiency,
|
|
9
|
+
compareTokens,
|
|
10
|
+
convertJsonString,
|
|
11
|
+
decode,
|
|
12
|
+
decoder,
|
|
13
|
+
encode,
|
|
14
|
+
encodeBatch,
|
|
15
|
+
encoder,
|
|
16
|
+
estimateCostSavings,
|
|
17
|
+
estimateTokens,
|
|
18
|
+
formatTokenStats,
|
|
19
|
+
index_default,
|
|
20
|
+
inferSchema,
|
|
21
|
+
inferType,
|
|
22
|
+
jsonToJtml,
|
|
23
|
+
jtmlToJson,
|
|
24
|
+
parseSchema,
|
|
25
|
+
roundTrip,
|
|
26
|
+
schemaManager,
|
|
27
|
+
serializeSchema,
|
|
28
|
+
validateAgainstSchema
|
|
29
|
+
} from "./chunk-SHDXMADE.mjs";
|
|
30
|
+
export {
|
|
31
|
+
JTMLDecoder,
|
|
32
|
+
JTMLEncoder,
|
|
33
|
+
JTMLError,
|
|
34
|
+
SchemaManager,
|
|
35
|
+
TYPE_MAP,
|
|
36
|
+
analyzeTokens,
|
|
37
|
+
calculateEfficiency,
|
|
38
|
+
compareTokens,
|
|
39
|
+
convertJsonString,
|
|
40
|
+
decode,
|
|
41
|
+
decoder,
|
|
42
|
+
index_default as default,
|
|
43
|
+
encode,
|
|
44
|
+
encodeBatch,
|
|
45
|
+
encoder,
|
|
46
|
+
estimateCostSavings,
|
|
47
|
+
estimateTokens,
|
|
48
|
+
formatTokenStats,
|
|
49
|
+
inferSchema,
|
|
50
|
+
inferType,
|
|
51
|
+
jsonToJtml,
|
|
52
|
+
jtmlToJson,
|
|
53
|
+
parseSchema,
|
|
54
|
+
roundTrip,
|
|
55
|
+
schemaManager,
|
|
56
|
+
serializeSchema,
|
|
57
|
+
validateAgainstSchema
|
|
58
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jtml/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "JSON Token-Minimized Language - Ultra-compact serialization format optimized for LLM token efficiency",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"jtml": "dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts --clean",
|
|
13
|
+
"dev": "tsup src/index.ts --format cjs,esm --watch",
|
|
14
|
+
"test": "vitest",
|
|
15
|
+
"test:coverage": "vitest --coverage",
|
|
16
|
+
"benchmark": "tsx tests/benchmarks.test.ts",
|
|
17
|
+
"lint": "eslint src/**/*.ts",
|
|
18
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"json",
|
|
23
|
+
"serialization",
|
|
24
|
+
"llm",
|
|
25
|
+
"tokens",
|
|
26
|
+
"compression",
|
|
27
|
+
"ai",
|
|
28
|
+
"language-model",
|
|
29
|
+
"optimization",
|
|
30
|
+
"typescript"
|
|
31
|
+
],
|
|
32
|
+
"author": "Thushanth Bengre",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/thushanthbengre22-dev/jtml.git"
|
|
37
|
+
},
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/thushanthbengre22-dev/jtml/issues"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/thushanthbengre22-dev/jtml#readme",
|
|
42
|
+
"files": [
|
|
43
|
+
"dist",
|
|
44
|
+
"README.md",
|
|
45
|
+
"LICENSE"
|
|
46
|
+
],
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/node": "^20.11.0",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^8.57.2",
|
|
50
|
+
"@typescript-eslint/parser": "^8.57.2",
|
|
51
|
+
"eslint": "^8.56.0",
|
|
52
|
+
"prettier": "^3.2.4",
|
|
53
|
+
"tsup": "^8.0.1",
|
|
54
|
+
"tsx": "^4.7.0",
|
|
55
|
+
"typescript": "^5.3.3",
|
|
56
|
+
"vitest": "^4.1.2"
|
|
57
|
+
},
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=20.0.0"
|
|
60
|
+
},
|
|
61
|
+
"sideEffects": false
|
|
62
|
+
}
|