mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-23 22:27:34 -05:00
13310814da
* #2606 add prettier plugin sort imprts * #2606 update pnpm-lock.yaml * #2606 update eslint rules * #2606 fixes website directory formatting Co-authored-by: Ayush Sharma <ayush.sharma@trivago.com>
18 lines
421 B
JavaScript
18 lines
421 B
JavaScript
import buildDebug from 'debug';
|
|
|
|
const namespace = Object.create(null);
|
|
|
|
const debug = buildDebug('verdaccio:e2e:global');
|
|
|
|
exports.addItem = function (name, value) {
|
|
namespace[name] = value;
|
|
};
|
|
|
|
exports.getItem = function (name) {
|
|
debug('get-item %o:%o', name, namespace);
|
|
if (!(name in namespace)) {
|
|
throw new Error('The item '.concat(name, ' does exist in the namespace'));
|
|
}
|
|
|
|
return namespace[name];
|
|
};
|