Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-runtime-apis-nodejs-util-workflow-guide.mdDocumentation 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.textA 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.textA 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.textCode 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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