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.

Bug/Feature: Support ES6 constructs

See original GitHub issue

Sets always evaluate to true, I suspect the behavior is similarly wrong for ES6 Map, WeakMap, and WeakSet:

isEqual(new Set([3]), new Set([6]))
=> true

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
ryan-roemercommented, Jan 31, 2020

@chrisbolin – I’ve got the start of a branch with initial failing regression tests at https://github.com/FormidableLabs/react-fast-compare/compare/feature/es6-datatypes

I’ll be back from parental leave in a week and may be able to div in. I think our work is something like:

  • Set support
  • Map support
  • Typed arrays support
  • Regression tests for all
  • Make sure the library correctly detects / permissively handles browsers / environments without those constructs.
  • WeakMap support
  • WeakSet support
0reactions
chrisbolincommented, Jan 31, 2020

But the fact still stands that it would be very hard (or impossible) to implement, based on the very design of the Weak objects:

there is no list of current objects stored in the collection. WeakSets are not enumerable.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet

Read more comments on GitHub >

github_iconTop Results From Across the Web

30. An overview of what's new in ES6 - Exploring JS
Constructs supporting iteration. 30.19. Generators. 30.19.1. What are generators? ... The introduction of the ES6 specification lists all new features:.
Read more >
"es6" | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >
My Twelve Favorite ES6/ES2015 Features | Capital One Tech
Destructuring Assignment; Enhanced Object Literals; Arrow Functions; Promises; Block-Scoped Constructs: Let and Const; Classes; Modules; For Of ...
Read more >
Top 10 ES6 Features Every Busy JavaScript Developer Must ...
Destructuring Assignment in ES6; Enhanced Object Literals in ES6; Arrow Functions in ES6; Promises in ES6; Block-Scoped Constructs Let and Const ...
Read more >
lukehoban/es6features: Overview of ECMAScript 6 features
See the ES6 standard for full specification of the ECMAScript 6 language. ... Object literals are extended to support setting the prototype at...
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