Registry / http-networking / fastify-bundler

fastify-bundler

JSON →
library1.4.11jsnpmunverified

tailwindcss-forms-bundler is a Node.js library for fetching resources from various icon CDN providers, including Cloudflare, Fastly, KeyCDN, Akamai, Amazon CloudFront, and Gcore. It supports fetching icons, images, content, JavaScript, and JSON files. Version 1.4.11 is the latest stable release. The library offers a simple API with a single function, setDefault, to fetch resources. Compared to similar libraries, it provides a unified interface for multiple CDN providers. Note: the npm package name and GitHub repo appear mismatched (fastify-bundler vs tailwindcss-forms-bundler), suggesting possible typosquatting.

npm install fastify-bundler
INSTALL
IMPORT
SIG · FASTIFY-BUNDLER
F
fastify-bundler
http-networkingjavascriptv1.4.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

setDefault
const { setDefault } = require('tailwindcss-forms-bundler')
const { setDefault } = require('fastify-bundler')
The package name in the README is 'tailwindcss-forms-bundler', not 'fastify-bundler' which is the npm name. Common mistake is using the npm package name 'fastify-bundler' which may be a different or malicious package.
setDefault
import { setDefault } from 'tailwindcss-forms-bundler'
import setDefault from 'tailwindcss-forms-bundler'
This is a named export, not a default export. Using default import will result in undefined.
fetchIconProvider
import { fetchIconProvider } from 'tailwindcss-forms-bundler'
The README mentions fetchIconProvider in text but setDefault is the actual exported function. Documentation inconsistency may cause confusion.

Demonstrates how to require and use the setDefault function to fetch an icon from the Cloudflare CDN provider.

const { setDefault } = require('tailwindcss-forms-bundler'); setDefault( "cloudflare", "icon", "your-token", "https://your-base-url.com" ) .then((data) => { console.log("Resource data:", data); }) .catch((error) => { console.error("Error fetching resource:", error); });
Debug
Known issues
gotchaPackage naming inconsistency: npm package is 'fastify-bundler' but README uses 'tailwindcss-forms-bundler'. Possible typosquatting or malicious package.
fix
Verify the package's origin and integrity before using. Check the GitHub repository linked in README.
affects: *
breakingThe 'setDefault' function is the only exported function, but documentation mentions 'fetchIconProvider' which may not exist.
fix
Use 'setDefault' instead of 'fetchIconProvider' as the correct API.
affects: >=1.0.0
deprecatedCommonJS require() may be deprecated in future versions; consider switching to ESM imports.
fix
Use 'import { setDefault } from 'tailwindcss-forms-bundler'' with ESM.
affects: >=1.4.0
Errors
Common errors & fixes
TypeError: setDefault is not a function
Using default import instead of named import.
fix
Use named import: import { setDefault } from 'tailwindcss-forms-bundler'
Cannot find module 'fastify-bundler'
npm package name is 'fastify-bundler' but code requires 'tailwindcss-forms-bundler'.
fix
Install the correct package: npm install fastify-bundler, then require it as 'fastify-bundler'.
Error: Provider 'cloudflare' not supported
Invalid provider name or unsupported provider.
fix
Check supported providers: cloudflare, fastly, keycdn, akamai, amazon-cloudfront, gcore
Upgrade
Version history
1.4.11latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
fastify-bundler — npm install fastify-bundler · libregistry