{"name":"term-img","version":"4.1.0","description":"Display images in iTerm","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/term-img.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"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":"^11.13.0","ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"3144dacc6c2376491ee76d706cdb0117789d6e53","bugs":{"url":"https://github.com/sindresorhus/term-img/issues"},"homepage":"https://github.com/sindresorhus/term-img#readme","_id":"term-img@4.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-DFpBhaF5j+2f7kheKFc1ajsAUUDGOaNPpKPtiIMxlbfud6mvfFZuWGnTRpaujUa5J7yl6cIw/h6nyr4mSsENPg==","shasum":"5b170961f7aa20b2f3b22deb8ad504beb963a8a5","tarball":"http://registry-npm.ywwl.com/term-img/download/term-img-4.1.0.tgz","fileCount":5,"unpackedSize":5950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpwBtCRA9TVsSAnZWagAArtIP/3rSYCMrXTT0GjItrKHR\nzgTy6N/0rqE6Oxi4qdyT8emjkavJHuJ6smaDkWpgzW5hoiKMUVNriOTD7+Qv\nCdggoU7S0FaqhqvwbtA3Jv3MTODD4c5+PCUjTDX8AuXd0qIQ+7nAK3aJH3tt\nQIoGZKhOj/ymxOy/Me7fX6TOjAO7HN434KxCulzSIsh69JAnCjubgRVZmMH3\nAQer6DhTDOF8q/2I1bL4ZO2z0taKLwhlaG1qkBxQLN4lEHEfbszylCKd+wOF\nHJJz/G5dyPnHWv7JuboRQP6mGwcjLnXotVLIkuiL161a0xvhNNQzTSi0PK2A\n/K6Wya1/QFdKKGN/1Sr1L9XePpav0hQtq4LqoFovttSVLaH9lBUzdW8UBXnD\ne/7pPdEfqw1/SdOQ6fw76wGLWVM5uv37E7Ob6W0UTotA93RNKQl5utRIpEcQ\n5Zu0OHMtlDFdW5o+r8dm2bGIJCia0DCEeYmADUL8dOXRf4pjan1hW/dQVaqw\nJM46zm7zwkp5IWre1z4wuHX3yun+WhYoJ74zhslSVeoMFVKLhgabhGDcyrYT\nv4IRqxyZSRyI2lFy3OJDacsNHr9mtXv+h4X4GexfqkaTyBcQT/eqrJInfQRX\nk4P1k1VrOAvdwKzeS4He6hMeEqZWpruCPwTU9l+JVJSZitRQ0SO2NOQRzDK3\nZKr3\r\n=xwg/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPIYxKG4SBGcT3R3BXa4fpwxOVhvwvDpUVR1U4WwSyNwIgSM7lUZLTu5lzIUmzMm3ipxQwmPto57X/+EpAa0K8XpY="}],"size":2653,"noattachment":false,"key":"/term-img/-/term-img-4.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/term-img_4.1.0_1554448492607_0.27889377552352457"},"_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":1554448492822,"_cnpm_publish_time":1554448492822,"dist-tags":{"latest":"7.1.0"}}