ranuts overview
Category Navigation
- Utility Functions - Functional programming, string processing, object processing, number processing, etc.
- File Operations - File read/write, watch operations
- Node Server - Mini HTTP framework: server, router, WebSocket, middleware (node-only)
- 2D Rendering (visual) - Canvas / WebGL / WebGPU 2D rendering engine (browser-only)
- Virtual DOM (vnode) - Snabbdom-style lightweight virtual DOM
- Bridge (postMessage) - Cross-context messaging over postMessage (window / iframe / worker)
- Service Worker (sw) - Cache strategies + the worker half of the precache protocol
- Event System - Publish-subscribe pattern (
SyncHook) - MIME Type - MIME type processing
Method list
| Method | description | detail |
|---|---|---|
| writeFile | Write to file | writeFile |
| readFile | Read file | readFile |
| readDir | Read the directory and get the names of all the files in the directory | readDir |
| watchFile | Check whether the contents of the file have changed | watchFile |
| queryFileInfo | Query file information | queryFileInfo |
| filterObj | Filter object | filterObj |
| SyncHook | Publish-subscribe class | SyncHook |
| getMime | Gets the mime type based on the file format suffix | getMime |
| getCookie | Gets the value of the specified cookie | getCookie |
💡 Tip: For more utility functions, see Utility Functions Category Index