webpack/test/helpers/supportsNullishCoalescing.js

11 lines
193 B
JavaScript

"use strict";
module.exports = function supportsNullishCoalescing() {
try {
const f = eval("(function f() { return null ?? true; })");
return f();
} catch (_err) {
return false;
}
};