npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nano-banana-1

v1766993.9.5

Published

Professional integration for https://supermaker.ai/image/nano-banana/

Readme

nano-banana-1

A lightweight JavaScript utility for performing basic image manipulations, primarily focused on resizing and format conversion. Simplifies common image processing tasks within Node.js environments.

Installation

Install the package using npm: bash npm install nano-banana-1

Usage

Here are several examples demonstrating how to use nano-banana-1 in your projects:

1. Resizing an Image:

This example demonstrates resizing an image to a specific width while maintaining aspect ratio. javascript const nanoBanana = require('nano-banana-1');

async function resizeImage() { try { const resizedImagePath = await nanoBanana.resizeImage('./input.jpg', './output_resized.jpg', { width: 200 }); console.log(Image resized successfully to: ${resizedImagePath}); } catch (error) { console.error('Error resizing image:', error); } }

resizeImage();

2. Converting Image Format:

Convert an image from one format (e.g., PNG) to another (e.g., JPEG). javascript const nanoBanana = require('nano-banana-1');

async function convertImageFormat() { try { const convertedImagePath = await nanoBanana.convertImageFormat('./input.png', './output.jpg', 'jpeg'); console.log(Image converted successfully to: ${convertedImagePath}); } catch (error) { console.error('Error converting image:', error); } }

convertImageFormat();

3. Resizing and Converting in a Single Operation:

Combine resizing and format conversion for efficient image processing. javascript const nanoBanana = require('nano-banana-1');

async function resizeAndConvert() { try { const outputImagePath = await nanoBanana.processImage('./input.png', './output_processed.jpg', { width: 300, format: 'jpeg' }); console.log(Image resized and converted successfully to: ${outputImagePath}); } catch (error) { console.error('Error processing image:', error); } }

resizeAndConvert();

4. Handling Errors:

Properly handle potential errors during image processing. javascript const nanoBanana = require('nano-banana-1');

async function processImageWithErrorHandler() { try { const outputImagePath = await nanoBanana.resizeImage('./nonexistent_image.jpg', './output.jpg', { width: 100 }); console.log(Image processed successfully: ${outputImagePath}); } catch (error) { console.error('Error processing image:', error.message); // Log the error message } }

processImageWithErrorHandler();

5. Using with Promises:

Employ promises for asynchronous operation management. javascript const nanoBanana = require('nano-banana-1');

nanoBanana.resizeImage('./input.jpg', './output_promise.jpg', { width: 150 }) .then(resizedImagePath => { console.log(Image resized via promise: ${resizedImagePath}); }) .catch(error => { console.error('Error resizing image via promise:', error); });

API Summary

  • resizeImage(inputPath, outputPath, options): Resizes an image.
    • inputPath: Path to the input image.
    • outputPath: Path to save the resized image.
    • options: An object with the following properties:
      • width (optional): The desired width of the image.
      • height (optional): The desired height of the image. If only one dimension is provided, the other is calculated to maintain aspect ratio.
  • convertImageFormat(inputPath, outputPath, format): Converts an image to a different format.
    • inputPath: Path to the input image.
    • outputPath: Path to save the converted image.
    • format: The desired image format (e.g., 'jpeg', 'png', 'webp').
  • processImage(inputPath, outputPath, options): Resizes and/or converts an image format.
    • inputPath: Path to the input image.
    • outputPath: Path to save the processed image.
    • options: An object with properties for resizing (width, height) and format conversion (format).

License

MIT

This package is part of the nano-banana-1 ecosystem. For advanced features and enterprise-grade tools, visit: https://supermaker.ai/image/nano-banana/