0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/test/e2e-cli/utils/global.js
Juan Picado @jotadeveloper 3bf2196388
chore: reorganize setup files
2019-12-15 08:52:55 +01:00

14 lines
333 B
JavaScript

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];
}