function create(db, opts) { var sdb = bytespace(db, String(++num), xtend(defs, opts)) if (opts.index) index.install(sdb) if (opts.search) search.install(sdb) return sdb }
/** * takse response and filer or filters. if filters loops through the array * and calls the filter function one by one the response else just calls the filter * function on response and returns the response from filter function * @class BruffProcessor * @method _runResponseFilter * @static * @param resp {Object} * @param filters {Function|Functions[]} function or array of functions */ static _runResponseFilter(resp, filters) { var newResp = xtend({}, resp); if (Array.isArray(filters)) { for (var i = 0; i < filters.length; i++) { var filterFunction = filters[i]; newResp = filterFunction(newResp); } } else { newResp = filters(newResp); } return newResp; }
return xtend(alias, { expression: toExpression(domain, alias), actions: toActions(alias)
xtend(story.story, { 'viewed': story.viewed })
requestObject = xtend(requestObject, destRequirement);