0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-03 23:09:17 -05:00
verdaccio/test/e2e-cli/utils/global.js
Juan Picado 69d7df20d8
build: enable pnp yarn2 (#2253)
* chore: enable pnp yarn

* chore: ignore pnp

* fix type issues on run eslint

* add missing dependency and fix some errors

* fix most of the errors

some were just disabled, already fixed in master

* add missing jest-config

* update jest@26 align with other deps

* add missing @babel/register

* clean up

* use yarn node

* use yarn node on release

* chore: add husky 6

* chore: add husky 6

* chore: lint-stage

* chore: test

* chore: add hook git

* chore: test

* chore: test

* update deps

* chore: fix commit lint

* fix docker run

* update git ignore
2021-05-13 23:13:57 +02:00

16 lines
366 B
JavaScript

/* eslint-disable no-console */
const namespace = Object.create(null);
exports.addItem = function(name, value) {
namespace[name] = value;
}
exports.getItem = function(name) {
console.log("get-item", name, namespace);
if (!(name in namespace)) {
throw new Error("The item ".concat(name, " does exist in the namespace"));
}
return namespace[name];
}