UNPKG

falcor

Version:

A JavaScript library for efficient data fetching.

12 lines (11 loc) 370 B
module.exports = function getModel(options) { options = options || {}; var root = {}; root.lru = options.lru || root, root.cache = options.cache || new Object(), root.expired = options.expired || new Array(), root.version = options.version || 0; var model = { _root: root }; model._path = options.path || new Array(); return model; }