diff options
Diffstat (limited to 'deps/npm/lib/utils/npm-registry-client/index.js')
-rw-r--r-- | deps/npm/lib/utils/npm-registry-client/index.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/deps/npm/lib/utils/npm-registry-client/index.js b/deps/npm/lib/utils/npm-registry-client/index.js new file mode 100644 index 0000000000..2a42947450 --- /dev/null +++ b/deps/npm/lib/utils/npm-registry-client/index.js @@ -0,0 +1,16 @@ + +// utilities for working with the js-registry site. + +var cached = {} +function lazyGet (p) { return function () { + return cached[p] || (cached[p] = require("./"+p+".js")) +}} + +function setLazyGet (p) { + Object.defineProperty(exports, p, + { get : lazyGet(p) + , enumerable : true }) +} + +; ["publish", "unpublish", "tag", "adduser", "get", "request", "star"] + .forEach(setLazyGet) |