# use-npm
npm command and package spec primitives for `RustUse`.
## Experimental
`use-npm` is experimental while `use-js` remains below `0.3.0`.
## Example
```rust
use use_npm::{NpmCommand, NpmPackageSpec, NpmRegistryUrl};
let registry = NpmRegistryUrl::new("https://registry.npmjs.org/")?;
let spec = NpmPackageSpec::new("react@latest")?;
assert_eq!(registry.as_str(), "https://registry.npmjs.org/");
assert_eq!(spec.as_str(), "react@latest");
assert_eq!("ci".parse::<NpmCommand>()?, NpmCommand::Ci);
# Ok::<(), Box<dyn std::error::Error>>(())
```
## Scope
- npm command labels.
- Script command text.
- Registry URL and package spec metadata.
## Non-goals
- Running npm.
- Registry API calls.
- Full npm package spec parsing.
## License
Licensed under either Apache-2.0 or MIT.