Polyfills for new ECMAScript 2015 APIs like Map and Set
meteor / ecmascript-runtime Goto Github PK
View Code? Open in Web Editor NEWPolyfills for new ECMAScript 2015 APIs like Map and Set
Polyfills for new ECMAScript 2015 APIs like Map and Set
Is it possible to include Number
polyfills?
https://github.com/zloirock/core-js/blob/master/es6/number.js
Everything except the constructor
since that would break match()
This is most likely an issue w/ Babel, and may be related to this issue, but I wanted to post this to see if someone might be able to help me.
Say I have the following classes defined:
A = class A {
constructor(value, options) {
this.value = value;
this.options = options;
console.log('constructor this: ', this);
}
get value() {
return this._value;
}
set value(value) {
this._value = value;
}
get options() {
return this._options;
}
set options(options) {
this._options = options;
}
get validationErrors() {
// Do standard validations for all classes of type A here
console.log('A.validationErrors this: ', this);
var validationErrs = [];
if (options && options.required && !value) {
validationErrs.push('Value is required');
}
return validationErrs;
}
}
B = class B extends A {
get validationErrors() {
console.log('B.validationErrors this: ', this);
var valErrs = super.validationErrors;
// Do custom validations for class B here
return valErrs;
}
}
var b = new B('val', {required: true});
var valErrs = b.validationErrors;
Strangely, what I see in the logs is:
constructor this: B{_value: "val", _options: {required: true}}
B.validationErrors this: B{_value: "val", _options: {requried: true}}
A.validationErrors this: A{}
Furthermore, if I call this.value
or this.options
in the parent's validationErrors
, I end up with undefined returned. It seems like the constructor and getters are being copied down, at least in behavior, but they shouldn't be, right? I would think that the child's constructor would simply call the parent's in this case, but that doesn't seem to be happening.
Hello,
When loading a webpage specifically on an apple iPhone in instagram the page will not load with [email protected] loaded.. a downgrade to [email protected] will load with no problem
Hi, im having some trouble with transpiling my code to ES5. When i build with --production flag my meteor application it runs OK on chrome and firefox, but when i run it on safari it returns this error:
"SyntaxError: Cannot declare a let variable twice: 'e'."
In this place of the code ( which is some meteor code )
I know this error is a bug already reported from safari, but my question is: the let statement is a ES2015 feature, why is it not being transpiled to a var?
Meteor @ 1.2.1
ECMAscript @ 0.1.6 (Can't upgrade to 0.3 because unversioned Accounts package depends on 0.1.6)
MacOS @ 10.11.2
Safari @ 9.0.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.