@robmarr/clean-package-name

1.0.2 • Public • Published

clean-package-name

JavaScript Style Guide Coverage Status Pipeline Status npm version chat

A script that cleans up a package name for use in other scripts.

Usage

This script will attempt to read the package name from the environment via npm_package_name or by reading the local package.json.

It will then either trim problem characters from the name:

npx @robmarr/clean-package-name
// returns scope/clean-package-name
// (anything but letters, numbers, underscores, dashes and forward slashes are removed)

The npm scope of a package can be removed via the --no-scope option.

npx @robmarr/clean-package-name --no-scope
// returns clean-package-name
// (again removes problem characters but then returns everything after the first forward slash)

License

Unless stated otherwise all works are:

  • Copyright © Robin Marr

and licensed under:

Readme

Keywords

none

Package Sidebar

Install

npm i @robmarr/clean-package-name

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

3.69 kB

Total Files

3

Last publish

Collaborators

  • robinmarr