{"_id":"vinyl-file","_rev":"3625253","name":"vinyl-file","description":"Create a vinyl file from an actual file","dist-tags":{"latest":"5.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2024-10-21T03:44:27.000Z","created":"2014-09-10T19:38:23.183Z","5.0.0":"2022-12-04T19:09:04.878Z","4.1.0":"2022-01-08T04:40:05.260Z","4.0.0":"2021-08-15T22:17:37.059Z","3.0.0":"2017-01-13T13:35:53.066Z","2.0.0":"2015-12-31T10:52:16.371Z","1.3.0":"2015-11-14T11:38:49.357Z","1.2.1":"2015-06-30T12:04:27.279Z","1.2.0":"2015-06-27T10:01:27.164Z","1.1.1":"2015-01-12T08:10:37.227Z","1.1.0":"2014-09-11T17:48:01.055Z","1.0.0":"2014-09-10T19:38:23.183Z"},"users":{"n370":true,"9joneg":true,"landy2014":true,"ccd3v":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/vinyl-file.git"},"versions":{"5.0.0":{"name":"vinyl-file","version":"5.0.0","description":"Create a vinyl file from an actual file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/vinyl-file.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["vinyl","fs","file","read","virtual","format","gulp","gulpfriendly"],"dependencies":{"@types/vinyl":"^2.0.7","strip-bom-buf":"^3.0.1","strip-bom-stream":"^5.0.0","vinyl":"^3.0.0"},"devDependencies":{"ava":"^5.1.0","is-stream":"^3.0.0","tsd":"^0.25.0","xo":"^0.53.1"},"types":"./index.d.ts","gitHead":"c10cc9ad5daa49dfd3966bafaac244dc1340aaf6","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"homepage":"https://github.com/sindresorhus/vinyl-file#readme","_id":"vinyl-file@5.0.0","_nodeVersion":"14.21.1","_npmVersion":"8.19.2","dist":{"shasum":"a051f79a8a0610f21ee69279be42ccfd6065d082","size":2311,"noattachment":false,"key":"/vinyl-file/-/vinyl-file-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-file/download/vinyl-file-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vinyl-file_5.0.0_1670180944720_0.25064290084968754"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-04T19:09:09.550Z","publish_time":1670180944878,"_cnpm_publish_time":1670180944878},"4.1.0":{"name":"vinyl-file","version":"4.1.0","description":"Create a vinyl file from an actual file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/vinyl-file.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["vinyl","fs","file","read","virtual","format","gulp","gulpfriendly"],"dependencies":{"@types/vinyl":"^2.0.6","strip-bom-buf":"^3.0.1","strip-bom-stream":"^5.0.0","vinyl":"^2.2.1"},"devDependencies":{"ava":"^4.0.0","is-stream":"^3.0.0","tsd":"^0.19.1","xo":"^0.47.0"},"types":"./index.d.ts","gitHead":"696bc9f814e5fa73f6ee44d9f6fcd6ade3df0d14","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"homepage":"https://github.com/sindresorhus/vinyl-file#readme","_id":"vinyl-file@4.1.0","_nodeVersion":"12.22.1","_npmVersion":"8.1.0","dist":{"shasum":"0e2fa611f79a64f6916094251e32bfa3d235bdbd","size":2322,"noattachment":false,"key":"/vinyl-file/-/vinyl-file-4.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-file/download/vinyl-file-4.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vinyl-file_4.1.0_1641616805121_0.9225977128791207"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-01-08T04:50:13.596Z","publish_time":1641616805260,"_cnpm_publish_time":1641616805260},"4.0.0":{"name":"vinyl-file","version":"4.0.0","description":"Create a vinyl file from an actual file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/vinyl-file.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava"},"keywords":["vinyl","fs","file","read","virtual","format","gulp","gulpfriendly"],"dependencies":{"strip-bom-buf":"^3.0.0","strip-bom-stream":"^5.0.0","vinyl":"^2.2.1"},"devDependencies":{"ava":"^3.15.0","is-stream":"^3.0.0","xo":"^0.44.0"},"gitHead":"23fdb441af274354b737cd98ad2770a79d07bed2","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"homepage":"https://github.com/sindresorhus/vinyl-file#readme","_id":"vinyl-file@4.0.0","_nodeVersion":"12.22.1","_npmVersion":"7.10.0","dist":{"shasum":"7cfc5b082fe459407e348d38c493a86299521ea7","size":2006,"noattachment":false,"key":"/vinyl-file/-/vinyl-file-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-file/download/vinyl-file-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vinyl-file_4.0.0_1629065856901_0.5644407528504114"},"_hasShrinkwrap":false,"publish_time":1629065857059,"_cnpm_publish_time":1629065857059},"3.0.0":{"name":"vinyl-file","version":"3.0.0","description":"Create a vinyl file from an actual file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/vinyl-file.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["vinyl","fs","file","read","virtual","format","gulp","gulpfriendly"],"dependencies":{"graceful-fs":"^4.1.2","pify":"^2.3.0","strip-bom-buf":"^1.0.0","strip-bom-stream":"^2.0.0","vinyl":"^2.0.1"},"devDependencies":{"ava":"*","is-stream":"^1.0.0","xo":"*"},"gitHead":"16a3203822d34a54b8d4d245dea148f69b0de2a5","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"homepage":"https://github.com/sindresorhus/vinyl-file#readme","_id":"vinyl-file@3.0.0","_shasum":"b104d9e4409ffa325faadd520642d0a3b488b365","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.6.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"b104d9e4409ffa325faadd520642d0a3b488b365","size":2212,"noattachment":false,"key":"/vinyl-file/-/vinyl-file-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-file/download/vinyl-file-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/vinyl-file-3.0.0.tgz_1484314552830_0.22277253423817456"},"directories":{},"publish_time":1484314553066,"_cnpm_publish_time":1484314553066,"_hasShrinkwrap":false},"2.0.0":{"name":"vinyl-file","version":"2.0.0","description":"Create a vinyl file from an actual file","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/vinyl-file"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["vinyl","fs","file","read","virtual","format","gulp","gulpfriendly"],"dependencies":{"graceful-fs":"^4.1.2","pify":"^2.3.0","pinkie-promise":"^2.0.0","strip-bom":"^2.0.0","strip-bom-stream":"^2.0.0","vinyl":"^1.1.0"},"devDependencies":{"ava":"*","is-stream":"^1.0.0","xo":"*"},"gitHead":"71b83a78f0d7f58b7f6829a45dc0c22faa8d44c8","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"homepage":"https://github.com/sindresorhus/vinyl-file","_id":"vinyl-file@2.0.0","_shasum":"a7ebf5ffbefda1b7d18d140fcb07b223efb6751a","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a7ebf5ffbefda1b7d18d140fcb07b223efb6751a","size":2193,"noattachment":false,"key":"/vinyl-file/-/vinyl-file-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-file/download/vinyl-file-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1451559136371,"_cnpm_publish_time":1451559136371,"_hasShrinkwrap":false},"1.3.0":{"name":"vinyl-file","version":"1.3.0","description":"Create a vinyl file from an actual file","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/vinyl-file"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && node test.js"},"files":["index.js"],"keywords":["vinyl","fs","file","read","virtual","format","gulp","gulpfriendly"],"dependencies":{"graceful-fs":"^4.1.2","strip-bom":"^2.0.0","strip-bom-stream":"^1.0.0","vinyl":"^1.1.0"},"devDependencies":{"ava":"0.0.4","is-stream":"^1.0.0","xo":"*"},"gitHead":"9bdbc6d9211d7d896e2e3c88afa8beb530d873b7","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"homepage":"https://github.com/sindresorhus/vinyl-file","_id":"vinyl-file@1.3.0","_shasum":"aa05634d3a867ba91447bedbb34afcb26f44f6e7","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"aa05634d3a867ba91447bedbb34afcb26f44f6e7","size":2192,"noattachment":false,"key":"/vinyl-file/-/vinyl-file-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-file/download/vinyl-file-1.3.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1447501129357,"_cnpm_publish_time":1447501129357,"_hasShrinkwrap":false},"1.2.1":{"name":"vinyl-file","version":"1.2.1","description":"Create a vinyl file from an actual file","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/vinyl-file"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["vinyl","fs","file","read","virtual","format","gulp","gulpfriendly"],"dependencies":{"graceful-fs":"^4.1.2","strip-bom":"^2.0.0","strip-bom-stream":"^1.0.0","vinyl":"^0.5.0"},"devDependencies":{"ava":"0.0.4","is-stream":"^1.0.0"},"gitHead":"32fb585ff3eff6396fa9ccfe70db30c64a0819c6","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"homepage":"https://github.com/sindresorhus/vinyl-file","_id":"vinyl-file@1.2.1","_shasum":"f439e35aba68b6e6508290f67fe34e9656eadd6f","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f439e35aba68b6e6508290f67fe34e9656eadd6f","size":2186,"noattachment":false,"key":"/vinyl-file/-/vinyl-file-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-file/download/vinyl-file-1.2.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1435665867279,"_cnpm_publish_time":1435665867279,"_hasShrinkwrap":false},"1.2.0":{"name":"vinyl-file","version":"1.2.0","description":"Create a vinyl file from an actual file","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/vinyl-file"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["vinyl","fs","file","read","virtual","format","gulp","gulpfriendly"],"dependencies":{"graceful-fs":"^3.0.2","strip-bom":"^1.0.0","vinyl":"^0.5.0"},"devDependencies":{"ava":"0.0.4","is-stream":"^1.0.0"},"gitHead":"41fc11b95881035c9411730f3a68051980e7cb25","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"homepage":"https://github.com/sindresorhus/vinyl-file","_id":"vinyl-file@1.2.0","_shasum":"4b7ddf484419820a4f6cf276949108c7c98c9497","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"4b7ddf484419820a4f6cf276949108c7c98c9497","size":2179,"noattachment":false,"key":"/vinyl-file/-/vinyl-file-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-file/download/vinyl-file-1.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1435399287164,"_cnpm_publish_time":1435399287164,"_hasShrinkwrap":false},"1.1.1":{"name":"vinyl-file","version":"1.1.1","description":"Create a vinyl file from an actual file","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/vinyl-file"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["vinyl","fs","file","read","virtual","format","gulp","gulpfriendly"],"dependencies":{"graceful-fs":"^3.0.2","strip-bom":"^1.0.0","vinyl":"^0.4.3"},"devDependencies":{"ava":"0.0.4","isstream":"^0.1.0"},"gitHead":"7f212093521084d585aa8214534a8cf39aa8ed95","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"homepage":"https://github.com/sindresorhus/vinyl-file","_id":"vinyl-file@1.1.1","_shasum":"81b655f26e658bd2e8829f28d63f847d6843d6d0","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"81b655f26e658bd2e8829f28d63f847d6843d6d0","size":2173,"noattachment":false,"key":"/vinyl-file/-/vinyl-file-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-file/download/vinyl-file-1.1.1.tgz"},"directories":{},"publish_time":1421050237227,"_cnpm_publish_time":1421050237227,"_hasShrinkwrap":false},"1.1.0":{"name":"vinyl-file","version":"1.1.0","description":"Create a vinyl file from an actual file","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/vinyl-file"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["vinyl","fs","file","read","virtual","format","gulp","gulpfriendly"],"dependencies":{"graceful-fs":"^3.0.2","strip-bom":"^1.0.0","vinyl":"^0.4.3"},"devDependencies":{"ava":"0.0.4","isstream":"^0.1.0"},"gitHead":"76b8bda6bd4e67f4cf178ae6df2c427cb2bba39f","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"homepage":"https://github.com/sindresorhus/vinyl-file","_id":"vinyl-file@1.1.0","_shasum":"5fadd9b4f295d686af265a947b7e1c1386d0ef81","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"5fadd9b4f295d686af265a947b7e1c1386d0ef81","size":1472,"noattachment":false,"key":"/vinyl-file/-/vinyl-file-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-file/download/vinyl-file-1.1.0.tgz"},"directories":{},"publish_time":1410457681055,"_cnpm_publish_time":1410457681055,"_hasShrinkwrap":false},"1.0.0":{"name":"vinyl-file","version":"1.0.0","description":"Create a vinyl file from an actual file","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/vinyl-file"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["vinyl","fs","file","read","virtual","format"],"dependencies":{"graceful-fs":"^3.0.2","strip-bom":"^1.0.0","vinyl":"^0.4.3"},"devDependencies":{"ava":"0.0.4"},"gitHead":"5586c706c46dbef225b9071c872f34b110abd152","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"homepage":"https://github.com/sindresorhus/vinyl-file","_id":"vinyl-file@1.0.0","_shasum":"0387f563cdd6be5b9719f21f5de276de5ffdc083","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"0387f563cdd6be5b9719f21f5de276de5ffdc083","size":980,"noattachment":false,"key":"/vinyl-file/-/vinyl-file-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-file/download/vinyl-file-1.0.0.tgz"},"directories":{},"publish_time":1410377903183,"_cnpm_publish_time":1410377903183,"_hasShrinkwrap":false}},"readme":"# vinyl-file\n\n> Create a [Vinyl file](https://github.com/gulpjs/vinyl) from an actual file\n\n## Install\n\n```sh\nnpm install vinyl-file\n```\n\n## Usage\n\n```js\nimport {vinylFile} from 'vinyl-file';\n\nconst file = await vinylFile('index.js');\n\nconsole.log(file.path);\n//=> '/Users/sindresorhus/dev/vinyl-file/index.js'\n\nconsole.log(file.cwd);\n//=> '/Users/sindresorhus/dev/vinyl-file'\n```\n\n## API\n\n### vinylFile(path, options?)\n\nCreate a Vinyl file asynchronously and return it.\n\n### vinylFileSync(path, options?)\n\nCreate a Vinyl file synchronously and return it.\n\n#### options\n\nType: `object`\n\n##### base\n\nType: `string`\\\nDefault: `process.cwd()`\n\nOverride the `base` of the Vinyl file.\n\n##### cwd\n\nType: `string`\\\nDefault: `process.cwd()`\n\nOverride the `cwd` (current working directory) of the Vinyl file.\n\n##### buffer\n\nType: `boolean`\\\nDefault: `true`\n\nSetting this to `false` will return `file.contents` as a stream. This is useful when working with large files.\n\n**Note:** Plugins might not implement support for streams.\n\n##### read\n\nType: `boolean`\\\nDefault: `true`\n\nSetting this to `false` will return `file.contents` as `null` and not read the file at all.\n\n## Related\n\n- [vinyl-read](https://github.com/SamVerschueren/vinyl-read) - Create vinyl files from glob patterns\n","_attachments":{},"homepage":"https://github.com/sindresorhus/vinyl-file#readme","bugs":{"url":"https://github.com/sindresorhus/vinyl-file/issues"},"license":"MIT"}