transactional
Version:
Reactive objects with transactional updates and automatic serialization
14 lines (13 loc) • 485 B
JavaScript
export function parseAttributes( rawSpecs, baseAttrs ){
const localAttrs = parse( rawSpecs ),
allAttrs = defaults( localAttrs, baseAttrs );
return {
_attributes : allAttrs,
properties : createProperties( localAttrs ),
forEach : createForEach( allAttrs ),
Attributes : createCloneCtor( allAttrs ),
defaults : createDefaults( allAttrs ),
toJSON : createToJSON( allAttrs ),
parse : createParse( allAttrs )
}
}