{"_id":"vinyl-contents","_rev":"5-d94e5eb63c4ce7e9d14ad9d27045cf87","name":"vinyl-contents","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"vinyl-contents","version":"1.0.0","description":"Utility to read the contents of a vinyl file.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/vinyl-contents.git"},"license":"MIT","engines":{"node":">= 6"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only","azure-pipelines":"nyc mocha --async-only --reporter xunit -O output=test.xunit","coveralls":"nyc report --reporter=text-lcov | coveralls"},"dependencies":{"bl":"^3.0.0","readable-stream":"^3.3.0","vinyl":"^2.2.0"},"devDependencies":{"coveralls":"github:phated/node-coveralls#2.x","eslint":"^5.16.0","eslint-config-gulp":"^3.0.1","expect":"^24.8.0","from2":"^2.3.0","mocha":"^6.1.4","nyc":"^14.1.1"},"keywords":[],"gitHead":"16d726fedec23275aca4a5748c15d8f5fe8e1e3d","bugs":{"url":"https://github.com/gulpjs/vinyl-contents/issues"},"homepage":"https://github.com/gulpjs/vinyl-contents#readme","_id":"vinyl-contents@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"dist":{"integrity":"sha512-xBH8ZUy8IK7K06eCBmd2GGjdf1EqNEGPNfRP2VsrCvSvsOggywGCGZg435WZiG/kcyCdXc1CZXCf4pUJ2EuEsg==","shasum":"f8f3456fe2dfb208a62c85653c2b682f87b5a2d5","tarball":"https://registry.npmjs.org/vinyl-contents/-/vinyl-contents-1.0.0.tgz","fileCount":4,"unpackedSize":5607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6xofCRA9TVsSAnZWagAA9dAP/jydNm+BemT5H94Y1N5H\nh8ZsKttnVUx2HFxOk6Cpg0Ryt7TssIGX9S64lY5UPiMwKcAwuKQBFNiv14Nv\nJM+lo0HNeaY5QpJi6Ool8sAIoclVdSZlTuwDxIt4T2qvEvZj2aDYJLTABQ6j\nvxeydVnfbTYwNPoIJOnmVD27xP1BlyFrNilmth69M/voXQ+wWiJKtQzb0y21\nXJC3HTzi5P29Cm0qmDSWpsN5WJ6d1XgirdOBfNdJSwBrsyUlacqyr5sfE00n\n0uH1iI0jpW1aRSVObN52n1PJpbZ3VWYDc7oPtvnbS6zD64BCy2A+95NesTjY\nMBuWmTQHEpeIJCSXPc+Y3NamZx9ZN66iLFLXX8Cj4sSg+9NwebZ0iYtaGZcj\nbuEtEEmJpeo42sNk+qYJ+hR8DKYaT82Ee56pcijo9g9DurD/411mBSJ41RH+\nAKDJmscLhY0ka2CXkGmHcnLyW32CaTrOJScu9JamxDoFMyUN85NUpKcjq2Oh\nab1EQLWrRqa82zoFSl34r97TivWc/Rj068cW94X1vY6blfzVHTApVgUQuBze\nCV1zVLaQrovzNwVoqSeAfw8PaMkz10eg9GSbVp9OUFXV33jAoF9dURwSpdh/\nAs5b6gNfFjcklGTFHX0YXh7EDbDPR2Is1Ck4yFHRULtlIhExaDQTfw/Kqo1q\nq3xL\r\n=2fBq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAwR0B33DIX5qaM1ZSUWMuiT7TRtqYmm8hmSoKRxyGH8AiBnXExP01PMGiUXaI0LBHfSX9JgIfNbb/m9Z8Qefpbu2Q=="}]},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vinyl-contents_1.0.0_1558911518946_0.44727217681280496"},"_hasShrinkwrap":false},"2.0.0":{"name":"vinyl-contents","version":"2.0.0","description":"Utility to read the contents of a vinyl file.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/vinyl-contents.git"},"license":"MIT","engines":{"node":">=10.13.0"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only"},"dependencies":{"bl":"^5.0.0","vinyl":"^3.0.0"},"devDependencies":{"eslint":"^7.0.0","eslint-config-gulp":"^5.0.0","eslint-plugin-node":"^11.1.0","expect":"^27.0.0","mocha":"^8.0.0","nyc":"^15.0.0","readable-stream":"^3.6.0","streamx":"^2.12.5"},"nyc":{"reporter":["lcov","text-summary"]},"prettier":{"singleQuote":true},"keywords":[],"gitHead":"d364c545d3b39d0ec91a95355dd4fa1a94ee0e15","bugs":{"url":"https://github.com/gulpjs/vinyl-contents/issues"},"homepage":"https://github.com/gulpjs/vinyl-contents#readme","_id":"vinyl-contents@2.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.11.0","dist":{"integrity":"sha512-cHq6NnGyi2pZ7xwdHSW1v4Jfnho4TEGtxZHw01cmnc8+i7jgR6bRnED/LbrKan/Q7CvVLbnvA5OepnhbpjBZ5Q==","shasum":"cc2ba4db3a36658d069249e9e36d9e2b41935d89","tarball":"https://registry.npmjs.org/vinyl-contents/-/vinyl-contents-2.0.0.tgz","fileCount":4,"unpackedSize":5022,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwB0HL76RkdAOuPmQ5CdTEexd8hKcp6jFwDkjhuCeaCwIhALt6Q3V8qx+xRm86spiLTI2vaKi7jsuGRz/5rJNxnQ6f"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQgiMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBCQ/9F55b0FNEby/BA09EfwyxGrqVvSfcd+KOpl45L5S5Bz+0lzRD\r\nI9QEESxcfUUEbyQCW2bBGjHPbYb2l1NAMfv+GRBQ0lf4nEjKtS+/nr5r8hQU\r\nrHyJKr7Qlnl2graV02xJjfSURd6Oo30QgwMcTWCi+CNrVYUpCRwS+6K7BJmR\r\nensuM6wI4WeZiOGCcnn5a/Knf1TZ0Uzanu1Sb97UvUa7nMSTA4/aaEv5LKWT\r\njT6PQH9GmQ+IE7DrUAWA31fBvfzQ9FNbga5mQazyB1g3+GPqftP3k8bThXQH\r\nvQhREyAjF+IKvKkNIdiKniXtTC7JT/GiPpdx2yH/17RIubmSvScS5AjjMOvd\r\nanP8UbyoQD3X5G6KFlp1OPE4oxo4bpwh8dfJEZQSwszkfitNuIr9TKxQv8BX\r\nCxh9mZH5mcuDypYs8SqrKtAIQr5KB3Czr2L/f04rn3bvwq7tOiHk8/KVy4Wo\r\ntV7aJtf5nzTXI/WAUDCZNtZ1LjJHSJf7C3U2E35iMjIPdqjjIogA4jwJ90Wz\r\n21wm6BH+Ov2ukeilsr8SmnJv7G+hryt8FAqtdwrgO6G/nCJKOH83t6+H00OJ\r\nYQnyGl1RXqogTvUWTMG2vYI486NqN292bV87mbVvLrHDdQeh/exQfXTajG76\r\nqN3DuKZYwrY7+1l79ytmqJz8ra+7GRIrTfI=\r\n=RMB8\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"directories":{},"maintainers":[{"name":"yocontra","email":"yo@contra.io"},{"name":"phated","email":"blaine.bublitz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vinyl-contents_2.0.0_1665271948515_0.69998670267211"},"_hasShrinkwrap":false}},"time":{"created":"2019-05-26T22:58:38.946Z","1.0.0":"2019-05-26T22:58:39.159Z","modified":"2022-10-08T23:32:28.735Z","2.0.0":"2022-10-08T23:32:28.660Z"},"maintainers":[{"name":"yocontra","email":"yo@contra.io"},{"name":"phated","email":"blaine.bublitz@gmail.com"}],"description":"Utility to read the contents of a vinyl file.","homepage":"https://github.com/gulpjs/vinyl-contents#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/gulpjs/vinyl-contents.git"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"bugs":{"url":"https://github.com/gulpjs/vinyl-contents/issues"},"license":"MIT","readme":"<p align=\"center\">\n  <a href=\"http://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# vinyl-contents\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nUtility to read the contents of a vinyl file.\n\n## Usage\n\n```js\n/*\n  WARNING: This is a very naive plugin implementation\n  It is only meant for demonstation purposes.\n  For a more complete implementation, see: https://github.com/gulp-community/gulp-pug\n*/\nvar { Transform } = require('streamx');\nvar pug = require('pug');\nvar vinylContents = require('vinyl-contents');\n\nfunction gulpPug(options) {\n  return new Transform({\n    transform: function (file, cb) {\n      vinylContents(file, function (err, contents) {\n        if (err) {\n          return cb(err);\n        }\n\n        if (!contents) {\n          return cb();\n        }\n\n        file.contents = pug.compile(contents.toString(), options)();\n        cb(null, file);\n      });\n    },\n  });\n}\n```\n\n## API\n\n### `vinylContents(file, callback)`\n\n**Warning:** Only use this if interacting with a library that can **only** receive strings or buffers. This loads all streaming contents into memory which can cause unexpected results for your end-users.\n\nTakes a Vinyl file and an error-first callback. Calls the callback with an error if one occur (or if the first argument is not a Vinyl file), or the file contents if no error occurs.\n\nIf the Vinyl contents are:\n\n- A Buffer, will be returned directly.\n- A Stream, will be buffered into a BufferList and returned.\n- Empty, will be undefined.\n\n## License\n\nMIT\n\n<!-- prettier-ignore-start -->\n[downloads-image]: https://img.shields.io/npm/dm/vinyl-contents.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/vinyl-contents\n[npm-image]: https://img.shields.io/npm/v/vinyl-contents.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/vinyl-contents/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/vinyl-contents/dev?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/vinyl-contents\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/vinyl-contents/master.svg?style=flat-square\n<!-- prettier-ignore-end -->\n","readmeFilename":"README.md"}