{"name":"file-url","version":"2.0.0","description":"Convert a path to a file url: `unicorn.jpg` → `file:///Users/sindresorhus/unicorn.jpg`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/file-url.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["file","url","uri","path","scheme","slash"],"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"cff18323da93dada6a3778e9e980f6965dbeb389","bugs":{"url":"https://github.com/sindresorhus/file-url/issues"},"homepage":"https://github.com/sindresorhus/file-url#readme","_id":"file-url@2.0.0","_shasum":"3ab949503d4dac7c8d85d15f1526ee3870cdd3d8","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.6.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"3ab949503d4dac7c8d85d15f1526ee3870cdd3d8","tarball":"http://registry-npm.ywwl.com/file-url/download/file-url-2.0.0.tgz","integrity":"sha512-gE691+NFLIUoaodjY+3+gSQwAJYbKNm+burPKqQCN/AnI9VESEuGFSP8Du2bm+FJiP76sMfCe6pNjMRhG/2XOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3CMCS9kT7Zt5jqqgfd5BfzF/jEh5VSizBSMR1hvblqAiBgzhuWIy0NvkVA4TVyCX/fthP5oyvntdB74ftfhebIMA=="}],"size":1719,"noattachment":false,"key":"/file-url/-/file-url-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/file-url-2.0.0.tgz_1479323329233_0.47910035331733525"},"directories":{},"readme":"# file-url\n\n> Convert a file path to a file url: `unicorn.jpg` → `file:///Users/sindresorhus/unicorn.jpg`\n\n## Install\n\n```\n$ npm install file-url\n```\n\n## Usage\n\n```js\nimport fileUrl from 'file-url';\n\nfileUrl('unicorn.jpg');\n//=> 'file:///Users/sindresorhus/dev/file-url/unicorn.jpg'\n\nfileUrl('/Users/pony/pics/unicorn.jpg');\n//=> 'file:///Users/pony/pics/unicorn.jpg'\n\nfileUrl('unicorn.jpg', {resolve: false});\n//=> 'file:///unicorn.jpg'\n```\n\n## API\n\n### fileUrl(filePath, options?)\n\nReturns the `filePath` converted to a file URL.\n\n#### filePath\n\nType: `string`\n\nFile path to convert.\n\n#### options\n\nType: `object`\n\n##### resolve\n\nType: `boolean`\\\nDefault: `true`\n\nPassing `false` will make it not call `path.resolve()` on the path.\n\n## Related\n\n- [file-url-cli](https://github.com/sindresorhus/file-url-cli) - CLI for this module\n","publish_time":1479323331068,"_cnpm_publish_time":1479323331068,"dist-tags":{"latest":"4.0.0"}}