UNPKG

relational-redis-store

Version:
18 lines 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.delay = exports.objectKeys = exports.getByFieldNameFromIndexedCollection = exports.toIndexedCollectionName = exports.toQueueName = exports.toCollectionId = void 0; var toCollectionId = function (collection, id) { return id; }; exports.toCollectionId = toCollectionId; var toQueueName = function (queue) { return "queue:".concat(queue); }; exports.toQueueName = toQueueName; var toIndexedCollectionName = function (collection, byField) { return "".concat(collection, ":by:").concat(byField); }; exports.toIndexedCollectionName = toIndexedCollectionName; var getByFieldNameFromIndexedCollection = function (indexedCollection) { return indexedCollection.split(':by:')[1]; }; exports.getByFieldNameFromIndexedCollection = getByFieldNameFromIndexedCollection; var objectKeys = function (o) { return Object.keys(o); }; exports.objectKeys = objectKeys; var delay = function (ms) { return new Promise(function (resolve) { setTimeout(resolve, ms); }); }; exports.delay = delay; //# sourceMappingURL=util.js.map