NestedTypes
NestedTypes copied to clipboard
Enum type
- it must support iteration through its option
- it must perform type casts on assignments.
- it must support display names, symbolic shortcuts, and serialization ids.
- syntax must be declarative and minimalistic.
Something like this:
var ChartTypes = Nested.Enum( 'one', 'two', 'three' );
var ChartTypes = Nested.Enum( { id : 'one', label : 'One' }, { id: 2, name: 'two', label: 'Two' }, 'three' );
ChartTypes.each( ... ) // underscore methods must be proxied
ChartTypes.one // elements should be available by name
Should behave as String. Could be implemented internally as Model.from.
waiting eagerly.
Will do it next after I finish my work in f/optimized-set branch. This is complete rewrite of the library, making model attributes assignments something like 10x faster than in vanilla backbone. Will finish it soon, next week.
Thx a lot.
+1
Ok, I will add enum too soon. It should be really cool.