Typed npm library bindings(40+) for js backend
Dependencies
Note: These bindings require installing the corresponding npm packages.# Example: Install React dependencies npm install react react-dom # Example: Install Hono npm install hono
moon add mizchi/js
moon add mizchi/npm_typed{
"import": [
"mizchi/js",
"mizchi/js/core",
"mizchi/npm_typed/react",
"mizchi/npm_typed/hono"
]
}| Package | npm | Status | Note |
|---|---|---|---|
| react | react | ๐งช Tested | Core React API |
| react_element | - | ๐งช Tested | Typed HTML elements for React |
| react_dom | react-dom | ๐งช Tested | React DOM |
| react_dom_client | react-dom/client | ๐งช Tested | Client-side rendering |
| react_dom_server | react-dom/server | ๐งช Tested | Server-side rendering |
| react_dom_static | react-dom/static | ๐ค AI Generated | Static rendering |
| react_router | react-router | ๐งช Tested | Client-side routing |
| testing_library_react | @testing-library/react | ๐งช Tested | React testing utilities |
| preact | preact | ๐งช Tested | Lightweight React alternative |
| testing_library_preact | @testing-library/preact | ๐ค AI Generated | Preact testing utilities |
| ink | ink | ๐งช Tested | React for CLI apps |
| ink_ui | @inkjs/ui | ๐งช Tested | Ink UI components |
| Package | npm | Status | Note |
|---|---|---|---|
| hono | hono | ๐งช Tested | Fast web framework, middleware support |
| better_auth | better-auth | ๐ค AI Generated | Authentication library |
| helmet | helmet | ๐งช Tested | Security headers middleware |
| Package | npm | Status | Note |
|---|---|---|---|
| ai | ai (Vercel AI SDK) | ๐งช Tested | AI/LLM integration |
| modelcontextprotocol | @modelcontextprotocol/sdk | ๐งช Tested | MCP server/client |
| claude_code | @anthropic-ai/claude-code | ๐ค AI Generated | Claude Code SDK |
| Package | npm | Status | Note |
|---|---|---|---|
| client_s3 | @aws-sdk/client-s3 | ๐งช Tested | S3-compatible storage (AWS, GCS, R2, MinIO) |
| Package | npm | Status | Note |
|---|---|---|---|
| pglite | @electric-sql/pglite | ๐งช Tested | Embedded PostgreSQL |
| duckdb | @duckdb/duckdb-wasm | ๐ค AI Generated | Analytical database |
| drizzle | drizzle-orm | ๐ค AI Generated | TypeScript ORM (see limitations) |
| pg | pg | ๐ค AI Generated | PostgreSQL client |
| Package | npm | Status | Note |
|---|---|---|---|
| terser | terser | ๐งช Tested | JavaScript minifier |
| vite | vite | ๐งช Tested | Next-gen build tool |
| unplugin | unplugin | ๐ค AI Generated | Unified plugin system |
| lighthouse | lighthouse | ๐ค AI Generated | Web performance auditing |
| esbuild | esbuild | ๐งช Tested | Fast bundler |
| oxc_minify | oxc-minify | ๐งช Tested | Oxc minifier |
| Package | npm | Status | Note |
|---|---|---|---|
| date_fns | date-fns | ๐งช Tested | Date manipulation |
| semver | semver | ๐งช Tested | Semantic versioning |
| chalk | chalk | ๐งช Tested | Terminal styling |
| colorette | colorette | ๐งช Tested | Terminal colors |
| dotenv | dotenv | ๐งช Tested | Environment variables |
| chokidar | chokidar | ๐งช Tested | File watching |
| yargs | yargs | ๐ค AI Generated | CLI argument parsing |
| debug | debug | ๐ค AI Generated | Debug logging |
| jose | jose | ๐งช Tested | JWT/JWE/JWS |
| comlink | comlink | ๐ค AI Generated | Web Worker RPC |
| simple_git | simple-git | ๐ค AI Generated | Git operations |
| ignore | ignore | ๐ค AI Generated | .gitignore parsing |
| memfs | memfs | ๐งช Tested | In-memory file system |
| minimatch | minimatch | ๐งช Tested | Glob matching |
| execa | execa | ๐งช Tested | Process execution |
| pino | pino | ๐งช Tested | Fast logging |
| magic_string | magic-string | ๐งช Tested | String manipulation |
| Package | npm | Status | Note |
|---|---|---|---|
| vitest | vitest | ๐ง Partial | Test runner |
| puppeteer | puppeteer | ๐งช Tested | Browser automation |
| playwright | playwright | ๐งช Tested | Browser automation |
| playwright_test | @playwright/test | ๐ค AI Generated | Playwright test framework |
| jsdom | jsdom | ๐งช Tested | DOM implementation |
| happy_dom | happy-dom | ๐งช Tested | Fast DOM implementation |
| global_jsdom | global-jsdom | ๐งช Tested | JSDOM for testing |
| testing_library | @testing-library/dom | ๐งช Tested | DOM testing utilities |
| msw | msw | ๐งช Tested | Mock Service Worker |
| ink_testing_library | ink-testing-library | ๐งช Tested | Ink testing utilities |
| Package | npm | Status | Note |
|---|---|---|---|
| htmlparser2 | htmlparser2 | ๐งช Tested | HTML/XML parser |
| js_yaml | js-yaml | ๐ค AI Generated | YAML parser |
| source_map | source-map | ๐งช Tested | Source map utilities |
| error_stack_parser | error-stack-parser | ๐งช Tested | Stack trace parsing |
./_scripts/new-library.sh <package_name>// moon.pkg.json: import mizchi/npm_typed/react, mizchi/npm_typed/react_element
fn counter(_props : Unit) -> @react.Element {
let (count, set_count) = @react.useState(0)
@react_element.div([
@react_element.span(["Count: \{count}"]),
@react_element.button(on_click=fn(_) { set_count(count + 1) }, ["+"]),
])
}// moon.pkg.json: import mizchi/npm_typed/hono
async fn main {
let app : @hono.Hono[@core.Any, @core.Any] = @hono.Hono::new()
app.get("/", fn(c) { c.text("Hello, Hono!") }) |> ignore
}// moon.pkg.json: import mizchi/npm_typed/zod
fn main {
let user_schema = @zod.object({
"name": @zod.string(),
"age": @zod.number().int(),
})
let data = @core.new_object()
data["name"] = @core.any("Alice")
data["age"] = @core.any(30)
match user_schema.safeParse(data) {
Ok(_) => println("Valid!")
Err(_) => println("Invalid!")
}
}Typed npm library bindings(40+) for js backend
Dependencies