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

First item in a !!pair is unnecessarily converted into string #481

Open
rlidwka opened this issue Apr 5, 2019 · 0 comments
Open

First item in a !!pair is unnecessarily converted into string #481

rlidwka opened this issue Apr 5, 2019 · 0 comments

Comments

@rlidwka
Copy link
Member

rlidwka commented Apr 5, 2019

pairs:
  Block tasks: !!pairs
    - { test: 123 }: { test: 123 }
    - { test: 456 }: { test: 456 }
{ pairs: 
   { 'Block tasks': 
      [ [ '[object Object]', { test: 123 } ],
        [ '[object Object]', { test: 456 } ] ] } }

In normal maps { test: 123 } is turned into string because javascript doesn't support objects as keys (Maps aside, as we don't support those).

But pairs are turned into arrays, which can have objects inside. So stringification is unnecessary there.

somewhat related to #169, but this is an issue that can be fixed without rewriting everything

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

No branches or pull requests

1 participant