background preloader

Lukehoban/es6features: Overview of ECMAScript 6 features

Lukehoban/es6features: Overview of ECMAScript 6 features

JavaScript : le futur, c’est maintenant ! • Christophe Porteneuve @ MS experiences 2016 gni ?! ES6 ou ES2015 ? Rappel : ES = ECMAScript = standard officiel de JavaScript. Avant 2015, on disait ES6, ES7… Par exemple, ES3 = 1999, ES5 = 2009, ES6 = 2015 Mais depuis 2015, on sort une version par an (en juin). On « met la pression » de tenue à jour en numérotant par année. Les noms officiels sont donc désormais ES2015, ES2016, etc. Et si on avait besoin de rien ? La prise en charge native est bien meilleure que ce qu’on croit. Edge 14 = 93% Firefox 52 = 94% Chrome 53 / Opera 40 = 97% Safari 10 (dont iOS 10) = 100% Node 6.5 = 97% Et « 90 % » ça suffit en général largement 😉 OK mais… dans la vraie vie… Pas encore de solution propre aux modules ES2015 natifs. import React, { PropTypes } from 'react' export default function Gauge ({ value, max = 100 }) { return <LinearProgress mode='determinate' value={value} max={max} />} IE (même 11), Firefox < 45, Chrome < 49, Opera < 36, Safari < 10, iOS < 10, Node < 6, Android Browser… Et ES2016+, alors ? Et l’an prochain, avec ES2017 on fait quoi ? Plugins

How to debug ES6 mocha tests in Visual Studio Code | Through the binary Previously, when I tried to debug the failed test in mocha, I start mocha in bash with --debug-brk, and attached the Visual Studio Code to that mocha process. My code is written in ES6, and I run mocha via babel-register. When I tried to enjoy the built-in debug function in VSC. Somehow, the stack seems completely irrelative to the actual code. Basically, 2 methods available. This article assumed that you have already set up the testing environment otherwise you won’t even have the debug problem. 1. The ES6 here means ES6 for both source code and tests file. In a word, 2 steps: add a user settings which enable you to debug ES6 codeuse built-in debug function to debug without running a separate mocha process Step 1: Add the following sections to your Launch Configurations. You can customize the above setting by modifying the args section, such as: The 1st line to where you hold your test file Step 2: 2. It just has 1 more step than the above one, transpile the ES6 code. Step 1: ". Step 2: Step 3:

Support d'ECMAScript 6 par Mozilla ECMAScript 2015 (sixième édition) est la version actuelle pour le langage ECMAScript. Couramment appelé « ES6 », c'est le standard qui définit l'implémentation de JavaScript, notamment pour SpiderMonkey, le moteur utilisé par Firefox et les autres applications Mozilla. Cette version est appelée avec le nom de code « ES.next » ou « Harmony ». Une version PDF et une version HTML du standard sont disponibles et peuvent être librement téléchargéees sur ecma-international.org. La liste de diffusion es-discuss permet de discuter des standards ECMAScript. Fonctionnalités d'ores et déjà supportéesEdit Les fonctionnalités suivantes sont déjà implantées dans Firefox : Bibliothèque standard Ajouts à l'objet Array Les objets Map et Set et leurs équivalents avec références faibles Nouvelles fonctions pour l'objet Math Ajouts à l'objet Number Ajouts à l'objet Object Ajouts à l'objet Date Nouvel objet Promise Promise (Firefox 24, activé par défaut dans Firefox 29) Nouvel objet Proxy Nouvel objet Reflect Instructions

Related: