{"name":"term-img","version":"5.0.0","description":"Display images in iTerm","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/term-img.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["term","image","iterm","iterm2","terminal","shell","console","command-line","img","pic","picture","photo","app","version","ansi","escape","gif","gifs","jpg","jpeg"],"dependencies":{"ansi-escapes":"^4.1.0","iterm2-version":"^4.1.0"},"devDependencies":{"@types/node":"^14.0.4","ava":"^2.0.0","tsd":"^0.11.0","xo":"^0.30.0"},"gitHead":"8ab21e2eae915f6a2ab8765c2998a19da9bb41dd","bugs":{"url":"https://github.com/sindresorhus/term-img/issues"},"homepage":"https://github.com/sindresorhus/term-img#readme","_id":"term-img@5.0.0","_nodeVersion":"10.20.1","_npmVersion":"6.14.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-Wpi50MA7bJwJKi5bVYu/t+xu9kNqesdzg6gWHOh3+1R9NRx1LmYoCMly9bUiabMZPNPH3juT8lOhZxUYxPEIBw==","shasum":"d563b82b9dad2a8a6cc28e07dc613a62d9273911","tarball":"http://registry-npm.ywwl.com/term-img/download/term-img-5.0.0.tgz","fileCount":5,"unpackedSize":5537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexhONCRA9TVsSAnZWagAA8dQP/A4D9lT9WZNT8wMCIhYA\nTd2oMHhi72cKusoIQaLkvPvmXpD2r31VWyiKAq8ZcsYRMWMYw/dc9NNW6+7o\nvcINRoPWXUDNfAjBdUXe4gCokK04hszCXdahCc5BanpCbUebVfJRh5amdZZw\ndhco3k5x3dZfKHv+ZD5F4Fv3TawrIYj9h6XYM8sYTCUTtH+oWPtQabqPGA6Q\nbpuEKdvWQLEO1i0bDyqj1mHPXL56d4C4xkGdi6K/At/j4tVBRtUQyuOlYD0+\nlDpNpzY6k51AMoMydQk53d5HeXmn2YCsnNoPOdWu0CuKIIeSP1xjZHNkvLKg\nBFUMN3Ch7y3qGbIDyWZGiLifCq6fpLtXv9d2nXVrGi/R1Db7ROxVnsaRjkOR\nVsOREf+t8unkWXJ4ZZq9Mm0qe/3JMiS0HtWuSPRdFBQWt5mAoEkr0buMVKTB\nocdZRVB0jE2gXLVnTgOka6Oj1ARGBjoxxEj1I6NQ08rnbl18IMz5Ifdw+XhX\nEtv290IXmpPlnUISaQy4XSllN73CUaYdGezcHaM/2Peviht9VixbYzQaxZV7\nH6ETaRWDXg8MArcc16uwGBm0cR5QjJuhc5+xZcYfyYli28lGqantaAHWMqxu\nrkY1KdjiXEcolSy1t2QERGrjWZjoEzJ9pw7Vo4SXrOL4u4bfAewZ6gdWBjSS\nMAZj\r\n=nYrr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGcjNRjj8EvsWVLlcS4uTQGfKa8Yxm0Vw2AP9KAgyWIMAiA5pR8itbyc60PuJrOMkPKg9FalN69s6mi3w8+QPSmRfQ=="}],"size":2632,"noattachment":false,"key":"/term-img/-/term-img-5.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/term-img_5.0.0_1590039436750_0.07484184258514515"},"_hasShrinkwrap":false,"readme":"# term-img\n\n> Display images in iTerm\n\nYou probably want the higher-level [`terminal-image`](https://github.com/sindresorhus/terminal-image) package for displaying your images.\n\n![](screenshot.jpg)\n\nEven [animated gifs](https://github.com/vdemedes/gifi)!\n\n*Currently only supported on [iTerm >=3](https://www.iterm2.com/downloads.html).*\n\n## Install\n\n```\n$ npm install term-img\n```\n\n## Usage\n\n```js\nimport terminalImage from 'term-img';\n\nfunction fallback() {\n\t// Return something else when not supported\n}\n\nconsole.log(terminalImage('unicorn.jpg', {fallback}));\n```\n\n## API\n\n### terminalImage(image, options?)\n\nGet the image as a `string` that you can log manually.\n\n#### image\n\nType: `string | Buffer`\n\nFile path to an image or an image as a buffer.\n\n#### options\n\nType: `object`\n\n##### width\n##### height\n\nType: `'auto' | string | number`\n\nThe width and height are given as a number followed by a unit, or the word `'auto'`.\n\n- `N`: N character cells.\n- `Npx`: N pixels.\n- `N%`: N percent of the session's width or height.\n- `auto`: The image's inherent size will be used to determine an appropriate dimension.\n\n##### preserveAspectRatio\n\nType: `boolean`\\\nDefault: `true`\n\n##### fallback\n\nType: `Function`\\\nDefault: `() => throw new UnsupportedTerminalError()`\n\nEnables you to do something else when the terminal doesn't support images.\n\n## Related\n\n- [term-img-cli](https://github.com/sindresorhus/term-img-cli) - CLI for this module\n","publish_time":1590039436878,"_cnpm_publish_time":1590039436878,"dist-tags":{"latest":"7.1.0"}}