pkguid

A module for parsing & creating package UIDs

Usage no npm install needed!

<script type="module">
  import pkguid from 'https://cdn.skypack.dev/pkguid';
</script>

README

pkguid

A module for parsing & creating package UIDs which supports CommonJS/AMD format

Usage

var pkguid = require("pkguid");

pkguid.parse("@namespace/name@1.0.0");
// returns { name: "@namespace/name", version: "1.0.0" }

pkguid.create("name", "1.0.0");
// returns "name@1.0.0"