"use strict"; const mapAsync = require("../map-async"); const All = require("../dlayer-symbol-all"); module.exports = function evaluateSingle({ command, selectResult }) { return function (ids) { return mapAsync(ids, async (id) => { if (id === All) { throw new Error(`This data source does not support fetching all entries`); } else { let result = await command(id); return (selectResult != null) ? selectResult(result) : result; } }); }; };