{"library":"vinyl-contents","type":"library","category":null,"description":"vinyl-contents is a specialized utility designed to asynchronously read and normalize the content of a Vinyl file object, a fundamental data structure within the Gulp.js build system. It adeptly handles Vinyl files where the `contents` property can be a Buffer, a Node.js Stream, or `null`. For Buffer contents, it returns them directly. For Stream contents, it buffers the entire stream into a `BufferList` and returns it as a single Buffer, while empty contents (e.g., `file.isNull()`) result in `undefined`. The current stable version is `2.0.0`. As part of the Gulp.js organization, its release cadence prioritizes stability and ecosystem compatibility over rapid feature iteration. A key differentiator is its focused handling of `Vinyl` file types, simplifying content access for downstream processes that expect string or buffer input, though it includes a crucial warning against processing very large streaming files due to its in-memory buffering approach.","language":"javascript","status":"active","version":"2.0.0","tags":["javascript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install vinyl-contents","imports":["import vinylContents from 'vinyl-contents';","const vinylContents = require('vinyl-contents');","import vinylContents, { type VinylContentsCallback } from 'vinyl-contents';"]},{"cmd":"yarn add vinyl-contents","imports":[]},{"cmd":"pnpm add vinyl-contents","imports":[]}],"homepage":null,"github":"https://github.com/gulpjs/vinyl-contents","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vinyl-contents","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/vinyl-contents/compatibility"}}