It helps you to keep your JavaScript codes up-to-date !
var Person = function () {
console.log('This is the constructor.');
};
Person.prototype.getAge = function (birthYear) {
var age = 2015;
age -= birthYear;
return result;
};
Object.defineProperty(Person.prototype, 'age', {
get: function () {
return this.getAge();
}
});
var personsUtils = {
getName: function (person) {
return person.firstname + ' ' + person.lastname;
},
logInformation: function (person) {
var message = 'You are ' + person.age;
console.log(message);
}
};
setTimeout(function() {
alert('Having some fun !');
});Currently xto6 supports these features
These features will be added soon :
xto6 transpiles your ES5 code to ES6. It does exactly the opposite of what other transpilers do (like babel and traceur).
Install it using npm :
$ npm install -g xto6
Transpile your boring code using the xto6 cli tool.
xto6 es5.js -o es6.js