Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum type #53

Open
gaperton opened this issue Nov 16, 2014 · 5 comments
Open

Enum type #53

gaperton opened this issue Nov 16, 2014 · 5 comments

Comments

@gaperton
Copy link

  • 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.

@kkilictepe
Copy link

waiting eagerly.

@gaperton
Copy link
Author

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.

@kkilictepe
Copy link

Thx a lot.

@Bolik
Copy link

Bolik commented Aug 10, 2016

+1

@gaperton
Copy link
Author

Ok, I will add enum too soon. It should be really cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants