@npmcli/name-from-folder

WebJar for @npmcli/name-from-folder

License

License

ISC
Categories

Categories

CLI User Interface
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

npmcli__name-from-folder
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

@npmcli/name-from-folder
WebJar for @npmcli/name-from-folder
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/npm/name-from-folder

Download npmcli__name-from-folder

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/npmcli__name-from-folder/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>npmcli__name-from-folder</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/npmcli__name-from-folder/
implementation 'org.webjars.npm:npmcli__name-from-folder:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/npmcli__name-from-folder/
implementation ("org.webjars.npm:npmcli__name-from-folder:1.0.1")
'org.webjars.npm:npmcli__name-from-folder:jar:1.0.1'
<dependency org="org.webjars.npm" name="npmcli__name-from-folder" rev="1.0.1">
  <artifact name="npmcli__name-from-folder" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='npmcli__name-from-folder', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "npmcli__name-from-folder" % "1.0.1"
[org.webjars.npm/npmcli__name-from-folder "1.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

@npmcli/name-from-folder

Get the package name from a folder path, including the scope if the basename of the dirname starts with @.

For a path like /x/y/z/@scope/pkg it'll return @scope/pkg. If the path name is something like /x/y/z/pkg, then it'll return pkg.

USAGE

const nameFromFolder = require('@npmcli/name-from-folder')
const name = nameFromFolder('/some/folder/path')
org.webjars.npm

npm

node package manager

Versions

Version
1.0.1