The `rfg-api` package provides a Node.js client for the RealFaviconGenerator's non-interactive API, enabling programmatic generation of favicons for various platforms including desktop browsers, iOS, and Android. Currently at version 0.5.3, the library focuses on integrating with the external API to manage favicon creation and asset generation. Release cadence appears to be driven primarily by bug fixes and dependency updates, particularly addressing security vulnerabilities in underlying HTTP clients and archive processors, rather than frequent new feature introductions. Its primary differentiator is its direct integration with the RealFaviconGenerator service, simplifying the complex process of generating a comprehensive set of favicons from a single master image. It largely operates using a callback-based asynchronous pattern.
npm install rfg-apiVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to initialize the `rfg-api` client, provide a placeholder master image path and API key, and call the `createFavicon` method with a callback to handle the asynchronous response for favicon generation.
Update any calls to `injectFaviconMarkups` to pass the HTML content as a string directly, instead of a file name.
Ensure your environment's Node.js version is compatible and review any custom patching or network monitoring that might be affected by underlying HTTP client changes. Regularly run `npm audit fix` to address known vulnerabilities in dependencies.
Obtain an API key from RealFaviconGenerator.net and provide it as the `apiKey` argument to `createFavicon`. It's recommended to load this key from environment variables (e.g., `process.env.RFG_API_KEY`) rather than hardcoding.
Adapt your code to the callback-based asynchronous pattern for API interactions. If integrating into a modern async/await codebase, consider wrapping the API calls in Promises (e.g., using `util.promisify` for Node.js built-in callback-style functions) or creating a custom Promise wrapper.
Ensure you have obtained a valid API key from RealFaviconGenerator.net and correctly pass it as the `apiKey` argument to `createFavicon`.
Check your internet connection, verify the RealFaviconGenerator service status page, and ensure no firewalls or proxies are blocking outbound access to `api.realfavicongenerator.net`.
Ensure `masterPicture` points to an existing, accessible, and valid image file (e.g., PNG, JPEG, SVG) on the filesystem, or is a correctly formatted base64 encoded image string.
No dependency data recorded yet.