Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including vinyl-named with all npm packages installed. Try it out:

var vinylNamed = require("vinyl-named")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

vinyl-named v1.1.0

Give vinyl files chunk names.


Give vinyl files arbitrary chunk names.


var named = require('vinyl-named')
var fs = require('vinyl-fs')
var through = require('through')

  .pipe(through(function(file) {
    // file.named now equals the basename minus the extension

// Or return a name for a given file
  .pipe(named(function(file) {
    return 'your own name'

// Or specify a custom name property
  .pipe(named(function(file) {
    file.customName = 'your name'


With npm do:

npm install vinyl-named

release history

  • 1.1.0 - renaming chunkName to named to be more generic
  • 1.0.0 - initial release


Copyright (c) 2014 Kyle Robinson Young
Licensed under the MIT license.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free