cloudflare · Cloudflare Workers Docs
Workers util
Provides instructions for using the Node.js util module in Cloudflare Workers to bridge callback and promise-based functions, perform type checking, and manipulate MIME types.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers util
Provides instructions for using the Node.js util module in Cloudflare Workers to bridge callback and promise-based functions, perform type checking, and manipulate MIME types.
When To Use
Use when you need to convert callback-based functions to promises, verify built-in value types, or manipulate MIME types within a Cloudflare Workers environment using Node.js compatibility mode.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-runtime-apis-nodejs-util-workflow-guide.md | Documentation detailing the Node.js compatibility layer for the Workers util module, including promisify, callbackify, and MIMEType APIs. | Questions about documentation detailing the Node.js compatibility layer for the Workers util module, including promisify, callbackify... |
examples/workers-runtime-apis-nodejs-util-cloudflare-workers-nodejs-util-promisif.text | A code example demonstrating how to use the promisify function from the node:util module within a Cloudflare Workers environment. | Exact payloads, commands, or snippets shown in A code example demonstrating how to use the promisify function from the node:util module within a Cloudflare Workers... |
examples/workers-runtime-apis-nodejs-util-cloudflare-workers-nodejs-util-callback.text | A code example demonstrating the use of the callbackify function from the node:util module within a Cloudflare Workers environment. | Exact payloads, commands, or snippets shown in A code example demonstrating the use of the callbackify function from the node:util module within a Cloudflare Worker... |
examples/workers-runtime-apis-nodejs-util-cloudflare-workers-nodejs-util-types-ex.text | Code examples demonstrating the usage of the node:util types module within the Cloudflare Workers runtime. | Exact payloads, commands, or snippets shown in Code examples demonstrating the usage of the node:util types module within the Cloudflare Workers runtime. |
examples/workers-runtime-apis-nodejs-util-cloudflare-workers-nodejs-util-mime-typ.text | A JavaScript example demonstrating the usage of the MIMEType class from the node:util module within Cloudflare Workers. | Exact payloads, commands, or snippets shown in A JavaScript example demonstrating the usage of the MIMEType class from the node:util module within Cloudflare Workers. |
What This Skill Covers
- To enable built-in Node.js APIs and polyfills, add the nodejs\compat compatibility flag to your Wrangler configuration file. This also enables nodejs\compat...
- Main sections:
promisify/callbackify,util.types,util.MIMEType.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/runtime-apis/nodejs/util/index.md
