packages/crafty/src/configuration.js
function getPresetName(file) {
  const packageJson = findUp.sync("package.json", { cwd: path.dirname(file) });

  if (packageJson) {
    return require(packageJson).name || file;
  }

  return file;
}
function getPresetName(file) {
  const packageJson = findUp.sync("package.json", { cwd: path.dirname(file) });

  if (packageJson) {
    return require(packageJson).name || file;
  }

  return file;
}
function getPresetName ( file ) { const packageJson = findUp . sync ( "package.json" , { cwd : path . dirname ( file ) } ) ; if ( packageJson ) { return require ( packageJson ) . name || file ; } return file ; }
Get the package's name or the filename if nothing is found
@param {*} file
Get the package s name or the filename if nothing is found