imgcat
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 = // print image from file // print image from url// console.log directly
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.
Related
- imgcat-cli - CLI of this module.
License
MIT © EGOIST