mirror of
https://github.com/hanzoai/zip-js.git
synced 2026-10-30 18:17:04 +00:00
Three end-to-end examples mirroring zip-rs:
- hello — minimal name → greeting handler (1.5 KB built)
- validate-email — port of the canonical validate fixture, byte-equivalent
JSON output to base/plugins/extbench/fixtures/goja-js (1.9 KB)
- policy-eval — realistic IAM/gateway authz decision handler (2.0 KB)
Built JS is committed so test harnesses + downstream consumers don't
depend on the toolchain. scripts/build-example.mjs is the monorepo
build driver (aliases @hanzo/zip to the local dist); end users use
the published npx zip-js build instead.
scripts/verify-examples.mjs loads each built bundle into a fresh V8
context and asserts byte-for-byte JSON output matches the canonical
reference strings — the same shape extbench compares.
13 lines
229 B
JSON
13 lines
229 B
JSON
{
|
|
"name": "@hanzo/zip-example-policy-eval",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "node ../../scripts/build-example.mjs ."
|
|
},
|
|
"dependencies": {
|
|
"@hanzo/zip": "*"
|
|
}
|
|
}
|