@0x-lerna-fork/map-to-registry

Produce registry uri and auth of package name from npm config

Usage no npm install needed!

<script type="module">
  import 0xLernaForkMapToRegistry from 'https://cdn.skypack.dev/@0x-lerna-fork/map-to-registry';
</script>

README

@0x-lerna-fork/map-to-registry

Produce registry uri and auth of package name from npm config

Usage

This is an extraction of an internal npm utility. Caveat emptor.

"use strict";

const mapToRegistry = require("@0x-lerna-fork/map-to-registry");
const npmConf = require("@0x-lerna-fork/npm-conf");

const config = npmConf();
const { uri, auth } = mapToRegistry("my-package", config);

uri and auth are suitable for arguments to npm-registry-client instance method parameters.

Install lerna for access to the lerna CLI.