dashboard
repositories
filestore
activity
search
login
main
/
chemicalsApp
危化品全生命周期管理app
summary
reflog
commits
tree
docs
forks
compare
blame
|
history
|
raw
init
马宇豪
2024-07-16
f591c27b57e2418c9495bc02ae8cfff84d35bc18
[chemicalsApp.git]
/
node_modules
/
npm
/
node_modules
/
@npmcli
/
name-from-folder
/
lib
/
index.js
1
2
3
4
5
6
7
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