valid_npm_name

Crates.iovalid_npm_name
lib.rsvalid_npm_name
version0.1.2
sourcesrc
created_at2024-05-23 01:59:23.805472
updated_at2024-08-02 13:28:38.69091
descriptionCheck whether a package name is a valid npm package name
homepagehttps://github.com/cijiugechu/valid_npm_name
repositoryhttps://github.com/cijiugechu/valid_npm_name
max_upload_size
id1249021
size42,121
阿良仔 (cijiugechu)

documentation

README

valid_npm_name

Cargo Documentation

Check whether a package name is a valid npm package name.

Usage

use valid_npm_name::ValidName;

let foo = ValidName::parse("foo").unwrap();
assert_eq!("foo", foo.to_string());

let bar_name = ValidName::parse("bar").unwrap();
let bar = bar_name.as_ref();
assert_eq!("bar", bar);

let baz = ValidName::parse("baz").unwrap();
assert_eq!("baz", baz.as_str());

Commit count: 9

cargo fmt