packages/veui-loader/src/index.js
function getPeerFilename (
  name,
  { transform = 'kebab-case', template = '{module}.css' }
) {
  if (!name) {
    return null
  }

  switch (transform) {
    case 'kebab-case':
      name = kebabCase(name)
      break
    case 'camelCase':
      name = camelCase(name)
      break
    case 'PascalCase':
      name = pascalCase(name)
      break
    case false:
    default:
      break
  }

  return template.replace(/\$?\{module\}/g, name)
}
function getPeerFilename (
  name,
  { transform = 'kebab-case', template = '{module}.css' }
) {
  if (!name) {
    return null
  }

  switch (transform) {
    case 'kebab-case':
      name = kebabCase(name)
      break
    case 'camelCase':
      name = camelCase(name)
      break
    case 'PascalCase':
      name = pascalCase(name)
      break
    case false:
    default:
      break
  }

  return template.replace(/\$?\{module\}/g, name)
}
function getPeerFilename ( name , { transform = 'kebab-case' , template = '{module}.css' } ) { if ( ! name ) { return null } switch ( transform ) { case 'kebab-case' : name = kebabCase ( name ) break case 'camelCase' : name = camelCase ( name ) break case 'PascalCase' : name = pascalCase ( name ) break case false : default : break } return template . replace ( / \$?\{module\} / g , name ) }
Convert a component name according to file name template.
@param {string} name Peer module file
@param {Object} options Transform options
@param {string} options.transform Transform type for base name
@param {string} options.template File name template
@returns {string} Peer module file name
Convert a component name according to file name template .