UNPKG

@nodeswork/kiws

Version:

Koa-based Injectable Web Service

18 lines (16 loc) 508 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _ = require("underscore"); const injection_1 = require("./injection"); const SERVICE_TAGS = ['service', 'provider']; /** * Service is global singleton instance, which doesn't take any inputs. */ function Service(options = {}) { return injection_1.Injectable({ tags: _.union(SERVICE_TAGS, options.tags || []), meta: options.meta, }); } exports.Service = Service; //# sourceMappingURL=service.js.map