{"name":"term-img","version":"2.1.0","description":"Display images in your terminal","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":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"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":"^2.0.0","iterm2-version":"^2.1.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"6d014c88977eda62053b157b00f0de0becc6a06f","bugs":{"url":"https://github.com/sindresorhus/term-img/issues"},"homepage":"https://github.com/sindresorhus/term-img#readme","_id":"term-img@2.1.0","_npmVersion":"5.3.0","_nodeVersion":"8.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-j78Y+26QYTTWvtVVCmDx94idvQm6p59E+xRfQDSevIyM8dg45uUAtr/xbu13l0BeKrebPyUpgh8PM3noXlIBkw==","shasum":"8ff0c9e03b50d861f27bff083e60670f109fa260","tarball":"http://registry-npm.ywwl.com/term-img/download/term-img-2.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAVBMZmdvE647V/CLH+oj4GAsZ5HW+9yQ3Ev1BUUC4SKAiEAw6aSty80R/CYt1+r6mBBVtwLFsVM8D5WVvC4lCZU4gM="}],"size":2312,"noattachment":false,"key":"/term-img/-/term-img-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/term-img-2.1.0.tgz_1500844223208_0.5424861903302372"},"directories":{},"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":1500844224149,"_cnpm_publish_time":1500844224149,"dist-tags":{"latest":"7.1.0"}}