New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

imgcat

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imgcat

Display image in iTerm2 version 2.9+

latest
Source
npmnpm
Version
2.3.0
Version published
Weekly downloads
186
17.72%
Maintainers
1
Weekly downloads
 
Created
Source

imgcat NPM version NPM downloads

This module is a high level wrapper of SindreSorhus's term-img, to display images from both URL and file path. Actually this requires iTerm 2.9+ too.

Install

$ npm install --save imgcat

Usage

const imgcat = require('imgcat')

// print image from file
imgcat('a.gif')
  .then(image => {
    console.log(image)
  })
  .catch(e => {
    console.log(e.name)
  })

// print image from url
// console.log directly
imgcat('http://path/to/image', {log: true})

API

imgcat(input, [options, events])

input

Type: string

Image path or URL.

options

term-img2 options. See https://github.com/sindresorhus/term-img#api.

events

Type: object

before

Type: function

Everything started.

after

Type: function

Everything done.

beforeDownload

Type: function

The download is started.

afterDownload

Type: function

The download is done.

  • imgcat-cli - CLI of this module.

License

MIT © EGOIST

Keywords

imgcat

FAQs

Package last updated on 14 Apr 2016

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