Questions tagged [ecmascript-harmony]

ECMAScript Harmony is the code name for proposals aiming to extend the current ECMA-262 specification.

ECMAScript Harmony is the code name for proposals aiming to extend the current ECMA-262 specification and to form the new . It names the agreed design trajectory of post-ES5 editions. It will include syntactic extensions, but the changes will be more modest than ECMAScript 4 in both semantic and syntactic innovation.

Packages, namespaces, and early binding from ECMAScript 4 are no longer included for planned releases, and don't live under the roof of Harmony.

References

  1. ECMAScript - Wikipedia
  2. ECMAScriptHarmony - ECMAScript.org
239 questions
1
vote
2 answers

Why does babel translate async/await to regenerators?

All version of babel translate an await statement to a _asyncToGenerator call, it obviously has some shortcomings: Code size grows dramatically Requires the regeneratorRuntime library From my understanding of the syntax I think any await should be…
otakustay
  • 11,817
  • 4
  • 39
  • 43
1
vote
1 answer

node --harmony: No such file or directory

Specs: Ubuntu 14.04 LTS server --- NodeJS 5.7.0 --- NPM 3.6.0 I am running a custom cli tool with the starting command: #!/usr/bin/env node --harmony. Works fine on my local machine (also v5.7.0), but on my server I am getting: /usr/bin/env: node…
iSkore
  • 7,394
  • 3
  • 34
  • 59
1
vote
1 answer

Harmony on Openshift

I'd like to get a simple generator function working on Openshift Online PaaS. I followed the instructions at nodejs-custom-version-openshift to run node 0.12 rather the default 0.10, and added a simple generator function to the bottom of server.js.…
KnewB
  • 353
  • 4
  • 16
1
vote
1 answer

How check if Google Chrome has #enable-javascript-harmony turned on

I'm trying to check if the user's from Google Chrome has activate the flag #enable-javascript-harmony. I have no idea how to do it. Any help will be appreciate.
1
vote
1 answer

How to use transpiled ES6 in ES5?

I'm creating some classes in ES6 and transpilling it into ES5. But I can't access the objects via ES5. The ES6 files import Util from "./utilities"; export default class Dom { construtor(){} static byId(s){ if(s !== null) { …
1
vote
1 answer

When should we define a function as async

This question confused me a long time so I decide to ask for help, I believe there is no certain answer, it could be an open discussion. If one of my function: Returns a promise Do not need to await any other functions Do not create promise itself,…
otakustay
  • 11,817
  • 4
  • 39
  • 43
1
vote
1 answer

Implicit Accessors in JavaScript?

In ColdFusion (a server-side language), it's possible to have CF generate any getters and setters in a class for you, like so: component output="false" accessors="true" { property string title; public any function init() output = false { …
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
1
vote
1 answer

Can derived classes have static get methods?

Update 2, added Gist: Question: Can derived classes have static get methods? 3 files here, with attempted use of static get method in a derived class. It works correctly when accessed inside the class' .es6 file, but doesn't when imported for…
Sze-Hung Daniel Tsui
  • 2,282
  • 13
  • 20
1
vote
3 answers

Is String.contains a standard function in JavaScript?

Recently I was writing logic in JavaScript and I wrote something like this var str="hello world"; if(str.contains("w")) //do something else //do anotherthing I thought it was working fine until I ran the page in Chrome. In Chrome…
Ein2012
  • 1,103
  • 1
  • 13
  • 33
1
vote
1 answer

Create ES6 class from a function

I'm trying to explore using ES6 classes instead of how we do it currently, using the Function.prototype means. Currently our API looks like: var myclass = createClass('MyClass', { test : function() {} }); We iterate through the object and apply…
Mitchell Simoens
  • 2,516
  • 2
  • 20
  • 29
1
vote
1 answer

Which edition of the ECMAScript standard is actually implemented in Chrome V8?

Which edition of the ECMAScript standard is actually implemented in Chrome V8? According to the introduction page to Chrome V8 on the Google Developers website, V8 implements the ECMA-262 5th edition specification (content last updated: September…
shmuli
  • 5,086
  • 4
  • 32
  • 64
1
vote
1 answer

JavaScript sets and value objects

I want to create a set of value objects in JavaScript. The problem is that in JavaScript equality is based on identity. Hence, two different objects with the same value will be treated as unequal: var objects = new Set; objects.add({ a: 1…
Aadit M Shah
  • 72,912
  • 30
  • 168
  • 299
1
vote
2 answers

[[Class]] property in JavaScript objects

The [[Class]] property of object is set according to how an object is created IIUC. Is this why some objects are rendered to the Chrome console in a meaningful way e.g. MyFoo and others are simply rendered as Object? With the new object literal…
Ben Aston
  • 53,718
  • 65
  • 205
  • 331
1
vote
1 answer

Proxy object in Chrome undefined

I wanted to experiment with the Proxy object that was introduced in EMCAScript 6 Flag chrome://flags/#enable-javascript-harmony enabled, chrome restarted I got the error that Proxy is not defined. Does anybody know more about the support for proxies…
Ralo
  • 59
  • 6
1
vote
1 answer

Using ES6 Arrow Functions in Node 0.11 w/ Foo.prototype

I'm getting what I see as unexpected behavior in using arrow functions inside a prototype extension. function ES6Example(){} ES6Example.prototype.foo = function(bar){ return ((baz) => { console.log(this) this.bar = baz })(bar) } var…