Closed joedaniels29 closed 5 years ago
Just to be clear, ES6 requires macOS Sierra 10.12+.
macOS El Capitan 10.11.6 is partially compliant with ES6. Anyone have a complete list of ES6 features supported by macOS 10.11.6?
Also of use, is this script written by @RobTrew, which will clearly identify whether or not JXA (as run in Script Editor) is ES6 compliant:
(function () {
'use strict';
try {
eval('[1, 2, 3].map(x => x * 2)');
return 'ES6';
} catch (e) {
return 'ES5';
}
})();
Similarly, you can check ES2016 (‘ES7’) compliance pretty trivially:
(function () {
'use strict'
try {
eval('2 ** 2')
return 'ES2016'
} catch (e) { return false }
})()
You can use the compat-table scripts, but they may require editing.
The guides could use an update, Happy to help out with it if wanted