PHP 8.2.30
Preview: index.js Size: 225 B
/opt/alt/alt-nodejs22/root/usr/lib/node_modules/npm/node_modules/@npmcli/name-from-folder/lib/index.js

const { basename, dirname } = require('path')

const getName = (parent, base) =>
  parent.charAt(0) === '@' ? `${parent}/${base}` : base

module.exports = dir => dir ? getName(basename(dirname(dir)), basename(dir))
  : false

Directory Contents

Dirs: 0 × Files: 1

Name Size Perms Modified Actions
225 B lrw-r--r-- 2026-02-23 06:53:59
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).