Comments (5)
+1
from scratch-js.
@BerkeleyTrue @zakangelle Just taking a look at this now - Could you provide a quick little snippet to test against?
from scratch-js.
Sure
var map = new Map();
map.set('cat', 'foo');
console.log(...map);
converts to
"use strict";
var _toConsumableArray = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } };
var map = new Map();
map.set("cat", "foo");
console.log.apply(console, _toConsumableArray(map));
from scratch-js.
@BerkeleyTrue Thanks for this. I have to admit though, I'm not sure I understand the ask. If you're asking to include the Babel polyfill, it should already be included and working as per here. Array.from
also seems to be behaving as expected:
var m = new Map([[1, 2], [2, 4], [4, 8]]);
console.log(Array.from(m));
// [[1,2],[2,4],[4,8]]
Is there another polyfill you're asking to include?
from scratch-js.
It looks like this is working now. I haven't tried using spread no iterables in a long time. Will close this.
from scratch-js.
Related Issues (20)
- Console doesn't work when you're in a blank chrome tab.
- Extension not working in chrome
- The scratch js is not available in chrome extension and it will shows msg HOT 1
- Saving multiple snippets of code HOT 1
- Add "High compliancy" mode
- Add intellisense HOT 1
- Papa Johnny Bug HOT 3
- Check for _babelPolyfill first HOT 3
- it's not support the decorator? HOT 1
- Execute Script Standalone
- Does it have toggle comment shortcut key? HOT 2
- Add support for es7 HOT 2
- import libraries
- consider add sandbox?
- Not working in Vivaldi under Arch Linux.
- How to get the console showing with Scratch-JS? HOT 1
- Prevents displaying console window
- Can't input lowercase "t"
- Can't type ternary statements HOT 1
- Cursor gets hidden when enters "highlighted" JS code
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scratch-js.