npm.io
1.1.0 • Published 9 years agoCLI

registry-swap

Licence
MIT
Version
1.1.0
Deps
7
Vulns
0
Weekly
0
Stars
3

registry-swap Build Status

Switch between npm registries

Install

$ npm install registry-swap

Usage

const registrySwap = require('registry-swap');

registrySwap.add('https://foobar.unicorn');
registrySwap.set('https://foobar.unicorn');
registrySwap.delete('https://foobar.unicorn');

registrySwap.list();
// Set {'https://registry.npmjs.org/', ...}

API

registrySwap.add(registry)

Add a new registry. Returns a Set with the saved registries.

registrySwap.set(registry)

Set the active registry. Will be added if it doesn't exist.

registrySwap.delete(registry)

Delete a registry. Returns a Set with the saved registries.

registry

Type: string

URL to registry.

registrySwap.list()

Returns a Set with the saved registries.

CLI

$ npm install --global registry-swap
$ registry-swap --help

  Usage
    $ registry-swap

License

MIT Kevin Martensson