question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

{{#each-in}} does not handle ES6 Maps

See original GitHub issue

I just came up with a situation where I wanted to iterate the keys of an object having guaranteed order, but objects per spec don’t guarantee key ordering (they do in practice for small objects in all engines tho).

It turns out {{#each-in}} does not support Maps, which do guarantee key insertion ordering.

Is this a feature you’d be interested in? 👍 / 👎 ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
stefanpennercommented, May 30, 2017

Agreed, we should have support for native iterables in {{#each when Symbol.iterator is present…

👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why can't I iterate the properties of my ES6 Map?
Not 100% positive, but I think you need to use map.set with Maps . var map = new Map(); map.set('foo', 'bar'); map.set('bar', 'baz');...
Read more >
How to loop through arrays in React - In Plain English
The map() method creates a new array with the results of calling a provided function on every element in the calling array. So...
Read more >
ES6 - Quick Guide - Tutorialspoint
ES6 - Quick Guide, ECMAScript (ES) is a scripting language specification standardized by ECMAScript International. It is used by applications to enable ...
Read more >
How to Use Map, Filter, and Reduce in JavaScript - Code
Using map , you don't have to manage the state of the for loop yourself. With map , you can operate on the...
Read more >
Configuring tasks - Grunt: The JavaScript Task Runner
b would match the path /xyz/123/acb , but not /xyz/acb/123 . expand Process a dynamic src-dest file mapping, see "Building the files object...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found