New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

term-img

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

term-img

Display images in iTerm

  • 7.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is term-img?

The term-img npm package allows you to display images in the terminal. It supports various image formats and provides a simple API to render images directly in the terminal window.

What are term-img's main functionalities?

Display Image

This feature allows you to display an image in the terminal by specifying the path to the image file.

const termImg = require('term-img');
termImg('path/to/image.jpg');

Fallback Function

This feature allows you to specify a fallback function that will be called if the image cannot be displayed in the terminal.

const termImg = require('term-img');
termImg('path/to/image.jpg', { fallback: () => console.log('Image could not be displayed') });

Handle Different Image Formats

This feature demonstrates the ability to handle different image formats such as PNG and GIF.

const termImg = require('term-img');
termImg('path/to/image.png');
termImg('path/to/image.gif');

Other packages similar to term-img

Keywords

FAQs

Package last updated on 26 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc