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

object listing syntax with asterisk is inconsistent #161

Closed
andrewrk opened this issue Jul 31, 2012 · 1 comment
Closed

object listing syntax with asterisk is inconsistent #161

andrewrk opened this issue Jul 31, 2012 · 1 comment

Comments

@andrewrk
Copy link

Let's say I have a list of 3 objects:

  fixtures.User =
    * id: 'freddie-freeloader'
      name: 'Freddie Freeloader'
      subscription: 'free'
    * id: 'polly-pro'
      name: 'Polly Pro'
      subscription: 'pro'
    * id: 'platinum-pete'
      name: 'Platinum Pete'
      subscription: 'platinum'

This looks like:

fixtures.User = [
  {
    id: 'freddie-freeloader',
    name: 'Freddie Freeloader',
    subscription: 'free'
  }, {
    id: 'polly-pro',
    name: 'Polly Pro',
    subscription: 'pro'
  }, {
    id: 'platinum-pete',
    name: 'Platinum Pete',
    subscription: 'platinum'
  }
];

Now let's say I remove 2 objects from the list:

  fixtures.User =
    * id: 'freddie-freeloader'
      name: 'Freddie Freeloader'
      subscription: 'free'

This looks like:

fixtures.User = {
  id: 'freddie-freeloader',
  name: 'Freddie Freeloader',
  subscription: 'free'
};

So my object has changed from a list of objects, to an object, just by removing objects from the list. This is error-prone.

@satyr
Copy link
Owner

satyr commented Jul 31, 2012

#132

@satyr satyr closed this as completed Jul 31, 2012
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

2 participants