How to use vinyl-contents-tostring - 1 common examples

To help you get started, we’ve selected a few vinyl-contents-tostring examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github perrin4869 / gulp-xml-transformer / src / index.js View on Github external
return through.obj(function (file, enc, cb) {
    if (!file.isNull()) {
      return vinylToString(file, enc)
        .then((xml) => transformer(transformations, parseXmlString(xml), nsUri))
        .then((transformedXml) => {
          const contents = getContents(file, transformedXml);

          Object.assign(file, { contents });


    return cb();


Convert vinyl file content to string

Latest version published 1 year ago

Package Health Score

59 / 100
Full package analysis

Popular vinyl-contents-tostring functions