Mercurial > pub > ImplabJs
view core/src/js/data/StatefullStoreAdapter.js @ 30:2dfba21cd879
sync
author | cin |
---|---|
date | Wed, 27 Jun 2018 02:46:14 +0300 |
parents | acdcdf1a8d21 |
children |
line wrap: on
line source
define(["dojo/_base/declare", "dojo/_base/array", "../safe", "./StoreAdapter"], function(declare, array, safe ,AdapterStore){ return declare([AdapterStore], { _attrs : null, constructor : function(opts) { safe.argumentNotEmptyArray(opts.attrs, "opts.attrs"); this._attrs = opts.attrs; }, mapItem : function(item) { var result = {}; array.forEach(this._attrs, function(p) { result[p] = item.get(p); }); return result; } }); });