{"name":"term-img","version":"3.0.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":">=6"},"scripts":{"test":"xo && ava"},"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":"^3.1.0","iterm2-version":"^3.0.0"},"devDependencies":{"ava":"^0.25.0","xo":"^0.23.0"},"gitHead":"9b342455f0c106c44e813dd4f8985392a21f2b0e","bugs":{"url":"https://github.com/sindresorhus/term-img/issues"},"homepage":"https://github.com/sindresorhus/term-img#readme","_id":"term-img@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-ZXwggmsv+mheSNZ0yOtpOBS5kTSosGPVcTeS9didqs2VRW0sIByYr2cLS1N2vlpGAjq5PKqmy6Z3hZEgcCG4Wg==","shasum":"95d7584f08e0e43a115d947519377ab0160f0a34","tarball":"http://registry-npm.ywwl.com/term-img/download/term-img-3.0.0.tgz","fileCount":4,"unpackedSize":4518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcAMdICRA9TVsSAnZWagAAAXcP/1s/jX/qsjB75Nu8xpGM\nbG1yeCUuW4EvT1PBu6KAnt95MT5vHKibRLrfdMfXA1yBWvpPd3mlYnpbw+mD\nMP+6FLNw27ybJwZjqYrIMvhKsKYvxILb9dmPxTQITWqDYh0l9CaX/+K0+/tW\n2XwEjgcm3xbmfuJpa955wUrvOA0ApovKqTThxCFAeOFX2zhjg8HnXii0pMgN\nqwHCB8npJWWJmvVouI2DbXkV9xOlPXjYl46IbYh0JXTGyMp07yXjh/tBxE0c\nIY41gS6OxuMgI8AMD3P8sm7YoxOwfvhWlwO9ydZFXUXVcrxCHJgYfvSRM4Df\nsIO7TaAFXpRklrdtU7BX51S+SU8FwzBDoQe7+02mMLNJ28RN/5a0cIniy/ok\n53HODjjsppi67aMqlZbTsKJabXL+Rt1qxibYR0LGDbF1eoRWcj3ivys7rpUR\na6YquxlVBOciN3aUXdzaTnmaw2ZtjStU6JWKjeKh7C3zkjfdVZFOKPJSR5k8\nGSejCSHLTE5QNSDWMmgvjBGqDUMhjtj84Jtc4EKX+5HQDhdjYxIrmmSux+2x\n3SswA3Jm5iGUW4WDMiWFw8dkzantT8GumXJw9Cf3CrKB+W8JfW+XkkkOGSCM\ng8FZb7eSBIkBSzdN1V2b5o4Fvn9HcsPB2vOoAccNc8oi1yrfxPz/eWtqBUw/\nhq6s\r\n=P0hy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAhmGuooS+QPNqhIkOCT/dJLZYGBxTdw4BqX6+mSu0yJAiBust0csruFXmtKGmZpgrF0WvOep3xFg3FkyuGn18q69g=="}],"size":2271,"noattachment":false,"key":"/term-img/-/term-img-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/term-img_3.0.0_1543554887825_0.494046912105673"},"_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":1543554887985,"_cnpm_publish_time":1543554887985,"dist-tags":{"latest":"7.1.0"}}